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 from command line


> Is there away for perl enter an variable from the command line. 
> 
> For example: 
> 
> ./test.pl tom
> 
>  
> 
>  
> 
> Thomas Browner
> 
>  
> 
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to