in reply to Re^2: %ENV problem?
in thread %ENV problem?

If the text message for the die command ends with a newline, it won't print out a line number. Consider the following:
#!/usr/bin/perl if (@ARGV) { die "There was a command line parameter"; } else { die "No command line stuff here.\n"; }

When called with perl filename.pl the message is "No command line stuff here." When called with perl filename.pl foo the output is "There was a command line parameter at filename.pl line 4."

Replies are listed 'Best First'.
Re^4: %ENV problem?
by suaveant (Parson) on Aug 30, 2004 at 16:40 UTC
    Ahhh... that is something I did not know... interesting, thanks!

                    - Ant
                    - Some of my best work - (1 2 3)