Perl Syntax

2004-06-30 Thread Drew Tomlinson
I'm using perl 5.8.4 on a 4.9 machine. I want to add code a perl script to check for value passed from command line. If it is null, I want to exit with an error message. First I tried this and got Use of uninitialized value in string eq at ./test.pl line 20. if ($ARGV[0] eq ) { print You

Re: Perl Syntax

2004-06-30 Thread Steve Bertrand
I'm using perl 5.8.4 on a 4.9 machine. I want to add code a perl script to check for value passed from command line. If it is null, I want to exit with an error message. First I tried this and got Use of uninitialized value in string eq at ./test.pl line 20. if ($ARGV[0] eq ) { print

Re: Perl Syntax

2004-06-30 Thread Drew Tomlinson
On 6/30/2004 10:04 AM Steve Bertrand wrote: I'm using perl 5.8.4 on a 4.9 machine. I want to add code a perl script to check for value passed from command line. If it is null, I want to exit with an error message. First I tried this and got Use of uninitialized value in string eq at ./test.pl

Re: Perl Syntax

2004-06-30 Thread Matthew Seaman
On Wed, Jun 30, 2004 at 10:17:45AM -0700, Drew Tomlinson wrote: On 6/30/2004 10:04 AM Steve Bertrand wrote: I know this works: if ($ARGV[0] eq '') { print Debug Mode\n; } Thanks for your reply. I tried your suggestion and it seems to work but I get this output: Use of

Re: Perl Syntax

2004-06-30 Thread Josh Paetzel
I'm using perl 5.8.4 on a 4.9 machine. I want to add code a perl script to check for value passed from command line. If it is null, I want to exit with an error message. First I tried this and got Use of uninitialized value in string eq at ./test.pl line 20. if ($ARGV[0] eq ) { print

Re: Perl Syntax -- SOLVED

2004-06-30 Thread Drew Tomlinson
On 6/30/2004 10:34 AM Matthew Seaman wrote: On Wed, Jun 30, 2004 at 10:17:45AM -0700, Drew Tomlinson wrote: On 6/30/2004 10:04 AM Steve Bertrand wrote: I know this works: if ($ARGV[0] eq '') { print Debug Mode\n; } Thanks for your reply. I tried your suggestion and it