On Thursday 06 May 2004 12:30, Stephen Shirley wrote:
> kevin lyda wrote:
> > shell. feh. :)
>> Uh huh.
>> > http://ie.suberic.net/~kevin/strerror.pl>> <SNIP>
>> > all in a 162 byte perl script with two ?: ops and a map call.
>> A 162 byte uncommented perl script. To compare like with like, i removed
> the comments from padraig's version:
>>diamond at fand:/space/dl(0)$ wc -c strerror strerror.pl
> 142 strerror
> 162 strerror.pl
>
Well here is my 166 byte (uncommented) rendition of Kevin's script, that I
believe does not need any comments.
#!/usr/bin/perl
use POSIX;
if (($e = $ARGV[0]) =~ /^\d+$/)
{
print "$e: " . strerror($e). "\n";
}
else
{
print map {$_="$_: ". strerror($_). "\n"; } (1..127);
}
> > kevin, who wrote it by shaking his keys next to a modem...
>> Perhaps you shook them a bit too much -)
>> Steve
--
John Allen, mailto:john.allen at dublinux.net
MandrakeClub Silver Member. http://www.dublinux.net
Mandrake Linux release 10.0 (Community) for i586, kernel 2.6.3-8mdk
14:10:29 up 9 days, 3:45, 1 user, load average: 1.13, 0.73, 0.49
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!