HP3000-L Archives

June 2000, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mike Yakubek <[log in to unmask]>
Reply To:
Date:
Mon, 26 Jun 2000 17:11:41 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (54 lines)
sorry, i should have included an example! Modules are far to complicated for
this type of example so, i will focus other methods. this example is not the
same as the Cobol compiller because, the cobol compiller substutes the
strings before the code is compiled (perl does not work that way). the thing
to remember is that you can include variables in literal strings which I
think is more powerful than the macro's

EXAMPLE,  variable in a string.   this will read a file <STDIN> of first
name seperated by a space then last name.

while(<>) {
  chomp;
  ($firstname, $lastname)  = split(/ /);
  print "Hello $firstname $lastname, how are you";
}




-----Original Message-----
From: Yakubek, Mike # NDCHQ
Sent: Monday, June 26, 2000 3:36 PM
To: [log in to unmask]; [log in to unmask]
Subject: RE: [HP3000-L] macro substitutions in Perl/iX



First off, although HP3000 COBOLII allows for macro substitutions, I don't
know of any cobol on other OS'S that do this. Maybe it is a trade off for
the fact that HP3000 CobolII does not have a functioning REPORT WRITER that
is available in ANSI COBOL.

On to perl, maybe you should explore MODULES to accomplish substations or
maybe just sub's. also there is the ever powerful regular expression. I am
sure that using some or all of these one can produce the expected results.


-----Original Message-----
From: Eben Yong [mailto:[log in to unmask]]
Sent: Monday, June 26, 2000 3:23 PM
To: [log in to unmask]
Subject: [HP3000-L] macro substitutions in Perl/iX


Hello-

COBOL allows for macro substitutions, and I'm wondering if the same
functionality is present in Perl?  If so, where in the perl documentation
can I find it?  Thanks as usual for any help.

Eben Yong
MIS Manager
Health Plan of San Mateo

ATOM RSS1 RSS2