[EMAIL PROTECTED] (Ton Hospel) writes: > This is not the first time I've been wondering about the exact form of $0. > I'd also like a judgement if `$0 args` is allowed (probably not ok), > and even `$^X $0 args` (probably ok).
It is usual with something like the following rule: - The program may only use the perl executable, no other executables on the system are allowed (the program may use itself though). You may use any of the perl 5.6.1 standard core modules (perldoc perlmodlib for a list of those core modules). Your solution must be portable in the sense that it should work on all versions of 5.6.1 everywhere (however, it's perfectly fine to abuse perl 5.6.1 bugs). - When tested, your script will be named anagrams.pl, and you must assume your script to have file permissions of 0644 (ie, non-executable for windows folks). So you are allowed to execute $^X and you can read and write $0. So you're right in that `$0~ isn't ok while `$^X $0` is. Anyone ready to exploit that you can write to the script? -- Peter Makholm | Ladies and gentlemen, take my advice, pull down your [EMAIL PROTECTED] | pants and slide on the ice http://hacking.dk | -- Sidney Freedman