Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Golf: RPN calculator

by japhy (Canon)
on May 10, 2001 at 19:49 UTC ( #79443=note: print w/ replies, xml ) Need Help??


in reply to Golf: RPN calculator

I did this on Fun-With-Perl (FWP) back in late March.

perl -le '{s!(\S+)\s+(\S+)\s*([-+*/])!"$1$3$2"!ee&&redo}print'


japhy -- Perl and Regex Hacker


Comment on Re: Golf: RPN calculator
Download Code
Re: Re: Golf: RPN calculator
by knobunc (Pilgrim) on May 10, 2001 at 21:40 UTC

    FWP

    I would try to explain, but I don't think I can.

    -ben

Re: Re: Golf: RPN calculator
by chipmunk (Parson) on May 11, 2001 at 01:32 UTC
    I think you neglected to read any input... :) perl -ple's,(\S+)\s+(\S+)\s*([-+*/]),"$1$3$2",ee&&redo'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://79443]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2014-07-31 23:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (255 votes), past polls