in reply to %ENV problem?

And WHERE is the exit value of 2 coming from?
That's the exit value die() sets. Have you checked your error logs for a die() message?

Replies are listed 'Best First'.
Re^2: %ENV problem?
by suaveant (Parson) on Aug 26, 2004 at 21:27 UTC
    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)

      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)