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

Re: [FWP] Poor reverse polish calculator



On Mar 24, abigail@foad.org said:

>70 characters, including the command line options and the quotes:
>
>  perl -pale'push@_,/\d/?$_:do{$_.=pop@_;eval pop(@_).$_}for@F;$_=pop@_'

You can save one char on the pop(@_) by making it pop(_).

-- 
Jeff "japhy" Pinyan      japhy@pobox.com      http://www.pobox.com/~japhy/
Are you a Monk?  http://www.perlmonks.com/     http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc.     http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter.         Brother #734


==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe