--- Ryan Guy <[EMAIL PROTECTED]> wrote:
> I want to get a consensus here.  Do you think one liners are faster than
> more extensive programs.  Discuss.

What, precisely, is there to discuss?  Faster to execute?  Faster to get work done?  
Faster to
waste time with?  One-liners are often used for a simple task that one is either not 
likely to
repeat, to test an idea, or to do something so simple that there is no point in having 
a utility
for it.  For example, if I'm analyzing an Apache error log for errors put out by a 
program called
"foo.cgi", I might use this:

    perl -ni.bak -e 'print if /\bfoo\.cgi\b/' logbackup.log

Would I write a program and keep it handy to perform that simple task?  Probably not.  
That really
doesn't have much to do with programming per se, that's using Perl as a nifty command 
line tool. 
Personally, I think it's apples and oranges.  *shrug*

Cheers,
Curtis "Ovid" Poe

=====
"Ovid" on http://www.perlmonks.org/
Someone asked me how to count to 10 in Perl:
push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//;
shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse @A

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to