> -----Original Message-----
> From: Ackim Chisha [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 24, 2001 1:38 PM
> To: [EMAIL PROTECTED]
> Subject: passing a value to Perl
>
>
> Hi everybody,
>
> is there a better way to pass a value from a shell script
> rather than write to a file and have perl read the file.
>
> In a shell script I can read the value as $1, how do I read
> it in perl. In C++ i can read the value using argv[1] , how
> can I read this same value in perl, instead of having to have
> shell script pass it to perl in form of a file.
Command-line arguments are in @ARGV. You can iterate over @ARGV or use shift
to grab one argument at a time (just like the shell).
perldoc perlrun
perldoc perlvar
perldoc -f shift
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]