Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Golf: RPN calculator

by tadman (Prior)
on May 10, 2001 at 22:50 UTC ( #79522=note: print w/ replies, xml ) Need Help??


in reply to Golf: RPN calculator

Interesting puzzle, and I'm not sure how you work japhy's solution, though it does seem interesting.

Here's my take, which ended up being a variation on Sprad's even though it started out differently:
sub p { # 68 characters my@s;for(@_){@s=(/^\D$/?(eval"$s[1]$_$s[0]",@s[2..$#s]):($_,@s))};@s } print p(@ARGV);
Comment on Re: Golf: RPN calculator
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2016-04-30 17:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    :nehw tseb si esrever ni gnitirW







    Results (441 votes). Check out past polls.