Software >> Development >> Languages >> Perl >> How to read parameters, arguments from the command line

use File::Basename; $prog = basename(replacebegin:content:replaceend); if($#ARGV < 0) { die "\nUsage: $prog [options]"; } foreach $arg (@ARGV) { print "$arg\n"; } # eg. use first argument as $computer $computer = $ARGV[0];