View Single Post
  #4 (permalink)  
Old 11-26-2007, 06:43 AM
S.Vinothkumar S.Vinothkumar is offline
D-Web Genius
 
Join Date: May 2007
Posts: 1,061
S.Vinothkumar is on a distinguished road
Wink Re: How do I read command-line arguments with Perl?

Hi buddy....


Here's a simple program:

Code:
#!/usr/bin/perl 
$numArgs = $#ARGV + 1; 
print "thanks, you gave me $numArgs command-line arguments.\n"; 
foreach $argnum (0 .. $#ARGV) { 
print "$ARGV[$argnum]\n"; 
}
__________________
S.VinothkumaR
Behind me is infinite power,
Before me is Endless Possibility,
Around me is Boundless Opportunity,
Why should I fear!
Reply With Quote