Nkuipers wrote:
>>My question then, is how do you pass variables to perl script from the
>>Unix command line and how are those variables processed within the script?
>>More than likely, the variables will need to be passed to either an array
>>or hash.
>
> Well, there are two main ways I know of to pass vars to Perl from the
> command
> line. The first is where the entire script is contained on the command
> line,
> affectionately known as a "one-liner". The second uses an array called
> @ARGV,
> which takes arguments passed after perl scriptname, in order. For
some people perfer to set their args in the env. variable like:
$export WHATEVER=1234
and then in their script:
#!/usr/bin/perl -w
use strict;
print "hi, i got: $ENV{'WHATEVER'} from you\n";
__END__
personally, i don't like it.
david
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]