1826564 Members
3546 Online
109695 Solutions
New Discussion

Re: PERL Script

 
SOLVED
Go to solution
Ricky B. Nino
Frequent Advisor

PERL Script

Hi,

How can I receive parameter values in a PERL Script.

Appreciate a very simple script...

Thanks.
Opportunities expand for people willing to put time and effort into learning new skills.
7 REPLIES 7
avsrini
Trusted Contributor

Re: PERL Script

I did'nt got your requirement. What you exactly want to print?.

If you want to print the value of a variable you can use the print $var.

Pls be specific.

Srini.
Be on top.
harry d brown jr
Honored Contributor
Solution

Re: PERL Script

#!/usr/contrib/bin/perl
#
#
$DataFileName = $ARGV[0];
$searchstr = $ARGV[1];
$valuestr = $ARGV[2];
print "filename is >>".$ARGV[0]."<< searchstr is >>".$ARGV[1]."<<\n";
print "====================\n";


This might be useful also:

http://members.shaw.ca/andrew-johnson/perl/archit/Oct00

live free or die
harry
Live Free or Die
harry d brown jr
Honored Contributor

Re: PERL Script

Which can be found in another of todays posts:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x0e7fef70e827d711abdc0090277a778c,00.html

live free or die
harry
Live Free or Die
Ricky B. Nino
Frequent Advisor

Re: PERL Script

Hi Harry,

Many thanks for a very straight and simple example.

For the PERL beginners like me may also want to take a look at this...

http://www.cs.cf.ac.uk/Dave/PERL/perl_caller.html.

Thanks and best regards...
Opportunities expand for people willing to put time and effort into learning new skills.
Robert Milne
Frequent Advisor

Re: PERL Script

Hi Ricky,

That link you suggested doesn't seem to work, it returns:

"URL not found

The URL you requested does not exist on the Computer Science server.

Requested address was /Dave/PERL/perl_caller.html. on server www.cs.cf.ac.uk. "

Do you know what it should be ?

Rob.

"For every pleasure there's a tax."
H.Merijn Brand (procura
Honored Contributor

Re: PERL Script

Drop the trailing dot:

http://www.cs.cf.ac.uk/Dave/PERL/perl_caller.html
Enjoy, Have FUN! H.Merijn
Ricky B. Nino
Frequent Advisor

Re: PERL Script

Hi Rob,

Sorry about the extra '.' at the end...

http://www.cs.cf.ac.uk/Dave/PERL/perl_caller.html

Thats the way it should be...
Opportunities expand for people willing to put time and effort into learning new skills.