in reply to Re^9: replicating the command 'unset LIBPATH' in perl
in thread replicating the command 'unset LIBPATH' in perl
When I run your version of the BEGIN code
Where'd you see that?
I get Use of uninitialized value in string eq
That's what happens when you use a variable to which you never assigned a value.
Also, in both versions the script just ends (as opposed to terminating with an error).
How did you determine that (as oppose to running successfully with no output)? If it's true, maybe whatever is messing with your Perl to cause it to give a stack trace for warnings — where's that eval come from? — is also messing with the process replacing itself.
The whole point of placing the code in BEGIN is to get it to execute as early as possible, yet the code is at line 67 of the script. Move that to line 1! There's no point in doing work before this check since it restarts the process from scratch.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^11: replicating the command 'unset LIBPATH' in perl
by viffer (Beadle) on May 20, 2010 at 00:32 UTC | |
by Anonymous Monk on May 20, 2010 at 02:07 UTC |