Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

(Golf) Reversing RPN Notation

by Masem (Monsignor)
on May 21, 2001 at 18:06 UTC ( #81969=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %priorities = {  '+' => 1,
                        '-' => 1,
                        '*' => 2,
                        '/' => 2 };
    
  2. or download this
    "2 3 4 * 5 / +"  --> 2 + 3 * 4 / 5
    "3 4 * 5 / 2 +"  --> 3 * 4 / 5 + 2
    "3 4 5 / * 2 +"  --> 3 * 4 / 5 + 2
    "2 3 + 4 * 5 /"  --> (2 + 3) * 4 / 5
    
  3. or download this
    my $o = (   ',' => 1,
                'j' => 2 );
    
    "_ just another , perl , hacker , j"  =>  
       "_ j ( just , another , perl , hacker )"
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2015-07-04 14:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls