in reply to Live and Die
Then we initialize the hash %$^ with two values.Key 1 is the strange _/ sign and key 0 is the new line operator ! This is very tricky since it looks like an empty string but the fact that the carriage return is between the two quotes is taken into account !
In the next block we do :
This is done to protect the arguments passed to the exec and didn't work with perl 5.6 on windows and 5.005 solaris . So we did instead :{$^="'$^'"}
Now comes the call to this same script via exec, passing the shifted @_ as an argument and testing if there is more than one argument .{$^="\"$^\""}
At this point you see that this will either print _/ or spaces or new lines and it is the choice of the numbers in the initial list that gives the following result :
_/ _/_/_/_/ _/_/_/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/_/_/ _/_/_/_/ _/_/_/_/ _/ _/ _/ _/ _/ _/ _/ _/_/_/_/ _/ _/ _/ _/ _/
ps : since it failed on our box could you tell us on what kind of OS and perl version did you run it ??
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Live and Die
by cristian (Hermit) on May 27, 2005 at 19:37 UTC |