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

Haha.. duh. The thing that was really screwing me up was that I redirect STDERR through the log function that was dying...

Also, the die message was screwed up, didn't display the line number or anything, so it was throwing me off.

Thanks, that let me find it.

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

Replies are listed 'Best First'.
Re^3: %ENV problem?
by Nkuvu (Priest) on Aug 28, 2004 at 04:21 UTC
    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."

      Ahhh... that is something I did not know... interesting, thanks!

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