[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shell Golf
I own you all. Check THIS out. 29 chars!
perl -e 'print "ahah fear\n"'
;)
Dam
On Fri, May 09, 2003 at 10:51:51PM -0500, Danny Sauer wrote:
> >> perl -F. -ane'$x=@F;@n=($x,$ARGV,$_)if@F>$n[0];END{warn"@n"}' *.pl
> >
> > Since you guys are quibbling over whitespace, here's my own entry
> > that whacks 4 more characters off of Steve's bloated entry:
> >
> > perl -F. -ane'@n=(++$#F,$ARGV,$_)if$#F>$n[0];END{warn"@n"}' *.pl
> >
> > Rock on. 64 characters.
> >
> > Mike808/
>
> Oh, yeah - adding to the array count will keep it in scalar context... So:
>
> perl -F. -ane'@n=(0+@F,$ARGV,$_)if@F>$n[0];END{warn"@n"}' *.pl
>
> 62 chars. ;)
>
> --Danny, who had to look up "$#" - that's just Evil, Mike...
>
>
>
>
> -
> To unsubscribe, send email to majordomo@luci.org with
> "unsubscribe luci-discuss" in the body.
--
--Damacus Porteng: damacus@munich.com & damacus@bastion.yi.org
--Webpage: http://bastion.yi.org/~damacus/ (PGP on site)
--IRC: net=irc.galaxynet.org nick=damacus chan=#cronus
--Me: PHP Web Developer, Student, Computer/Linux Geek.
--Car: 2002 Black Saturn SL2 (5spd) (10K mi.) (stock)
--Car: 1993 Emerald Green Ford Taurus SHO (5spd) (114K mi.)
--Name: Sheeva -- 'Charming' (Iranian) or 'Good, Peace' (Irish)
--========== Nook's SFCs, SHOShop Y-Pipe w/ HiFlow cats
--========== SHOShop T304 catback, PPlus Reinf. Mtr Mnts
-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.