Abigail on 18 Aug 2004 23:49:10 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Horrific JAPH


On Tue, Aug 17, 2004 at 06:54:26AM -0400, Eric Roode wrote:
> 
> The goal of this japh is to build the string "echo Just another Perl hacker" a
> to execute it in the shell.
> 
> The first problem was to gather those particular characters together.  The way
> did this was to set $! to a known value (which contained most of those letters
> by executing a nonexistent program.

As Robert pointed out, it would fail in the unlikely event a program named
60 is in the users path. Here's another way to set $! to
"No such file or directory":

    $!=!$!+!$!

Of course, that's not really portable.



Abigail
-
**Majordomo list services provided by PANIX <URL:http://www.panix.com>**
**To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**