We're golfing in the cube farm today, I'm writing Perl code and my adversary is writing PHP. So far he's got me by one character on this one, but I can't see how I can make it any shorter.
The program must take a file name from the command line and return the number of characters in the file. Not the most ambitious requirements in the world for sure :). A newline at the end of the program output is required.
It would be nice if I could (get help) figuring out a way to restore Perl's bragging rights...
print((stat pop)[7],$/)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Golfing on a quiet Friday afternoon...
by japhy (Canon) on Jul 26, 2002 at 20:18 UTC | |
by particle (Vicar) on Jul 27, 2002 at 00:42 UTC | |
by BrowserUk (Patriarch) on Jul 26, 2002 at 21:21 UTC | |
by vladb (Vicar) on Jul 26, 2002 at 22:04 UTC | |
by BrowserUk (Patriarch) on Jul 26, 2002 at 23:20 UTC | |
by sauoq (Abbot) on Jul 27, 2002 at 00:14 UTC | |
by hans_moleman (Beadle) on Jul 26, 2002 at 20:56 UTC | |
Re: Golfing on a quiet Friday afternoon...
by Chmrr (Vicar) on Jul 26, 2002 at 21:59 UTC |
Back to
Meditations