Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

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

Replies are listed 'Best First'.
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'
Re: Re: Golf: RPN calculator
by knobunc (Pilgrim) on May 10, 2001 at 21:40 UTC


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


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://79443]
[pryrt]: also mismatches; but matches their sha1
[pryrt]: The mismatched ones have a Jan 23 2017 Last-Modified header -- I wonder if they rezipped them and forgot to update the sha1
[stevieb]: RT ticket for the csum mismatch of various versions of Strawberry Perl

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2017-03-29 21:10 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (353 votes). Check out past polls.