Thomas Browner wrote:
> Is there away for perl enter an variable from the command line.
>
> For example:
>
> ./test.pl tom
>
>
>
>
>
> Thomas Browner
You have a number of options, but @ARGV holds what comes from the
command line. $ARGV[0] holds item 1, $ARGV[1] holds item 2, etc.
Yes, with $ARGV[0]. The number is the variable postion. 0 is the first.
#!/usr/bin/perl
$name = $ARGV[0];
print "Hello, $name!\n";
-Jose
- Original Message -
From: "Thomas Browner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 07, 2003 2:04 PM
Subject: variable fro
On Fri, 7 Feb 2003 15:04:16 -0600, "Thomas Browner" <[EMAIL PROTECTED]>
wrote:
> Is there away for perl enter an variable from the command line.
>
> For example:
>
> ./test.pl tom
>
perldoc perlvar (I think)
Input on the command line is aut