DelphiFAQ Home Search:
General :: Programming :: perl
General questions about perl.


This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.
Recommended links on this topic:
Featured Article

Reading command line arguments from perl


I am writing some command line tools to manipulate a large number of text files. How can I pass commandline arguments?


The command line can be read with @ARGV

 $numArgs = $#ARGV + 1;
 print "$numArgs command-line arguments.\n";
 foreach $argnum (0 .. $#ARGV) {
    print "@ARGV[$argnum]\n";

Generated 8:01:30 on Sep 22, 2020