I love this list.

Jonathan Paton mentioned Math::RPN; I hadn't heard about that one.
My favourite little handy rpn desktop calculator just got a whole
lot simpler:

        #!/usr/bin/perl -w
        use Math::RPN;

        if (@ARGV) {
            print for rpn map { split } @ARGV;
            print "\n";
            exit 0;
        }

        $| = 1;
        my @stack;
        while (<>) {
            @stack = rpn(@stack, split);
            exit 0 if @stack and $stack[-1] =~ /^q/i;
            print "@stack ";
        }

-Bennett
[EMAIL PROTECTED](P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to