Re: passing parameters to Perl script

2001-06-28 Thread Brett W. McCoy
On Thu, 28 Jun 2001, Scott Taylor wrote: > How can I pass parameters from *nix command line to a Perl script? > Like $1 in shell scripting. > > #!/usr/bin/perl -w > > $myfile = $1; This will: my $file = $ARGV[0]; @ARGV contains all of the command-line parameters. -- Brett

Re: passing parameters to Perl script

2001-06-28 Thread Jeff 'japhy' Pinyan
On Jun 28, Scott Taylor said: >How can I pass parameters from *nix command line to a Perl script? > Like $1 in shell scripting. You want the @ARGV array. $ARGV[0] is the first argument to your program. Check the 'perlvar' documentation for more about @ARGV. -- Jeff "japhy" Pinyan [EMAI

passing parameters to Perl script

2001-06-28 Thread Scott Taylor
Hello, How can I pass parameters from *nix command line to a Perl script? Like $1 in shell scripting. #!/usr/bin/perl -w $myfile = $1; doesn't work. Thanks. Scott