Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Matts (1087)

  (email not shown publicly)

I work for MessageLabs [] in Toronto, ON, Canada. I write spam filters, MTA software, high performance network software, string matching algorithms, and other cool stuff mostly in Perl and C.

Journal of Matts (1087)

Tuesday October 22, 2002
06:54 AM

Too geeky

[ #8515 ]

Am I too much of a perl geek? Whenever I have to do a calculation I never ever fire up the calculator - I always use:

  perl -le 'print ...'

Wbat lengths do you go to to use perl for any given problem?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • The script I use to upload a new version of XML::Twig to my site:

    use XML::Twig;

    my $MIRROR_DIR = "/web/mirror/infotree/xmltwig";
    my $WEB_DIR    = "mirlin:/web/infotree/";

    my $version  = $XML::Twig::VERSION; # can't get this from the shell!
    my $tar      = "XML-Twig-$version.tar.gz";
    my $dev_text = "twig_dev.txt";
    my $dev_html = "twig_dev.html";
    my $readme   = "XML-Twig-$version.README";

    system "make clean; rm; perl speedup >;

  • Like you, I do my calculations from the shell using Perl, but I at least turned the "perl -le 'print...'" into a shell alias to make it easier to type ;)


    -- Robin Berjon []

    • used to use solar calculator
      then pen and paper
      then xcalc
      then perl -e 'print '
      then just perl and typed on stdin
      now bc

      wish i knew about bc before
      • I've known about bc before, but somehow I can't wrap my head around it... I know, it's probably due to my stupidity as I can't say it looks that difficult.

        Maybe I'm not good at simple things, maybe that's why I now work where I do.



        -- Robin Berjon []

  • My calculator is perl -de 1. Earlier this semester I had a bit of a disaster in software engineering class as I was sitting on the front row doing COCOMO calculations for the class and coming up with the wrong answer because I didn't understand the use of Perl's ** operator. :)

    J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
  • Occassionlly I use shell scripts for build processes. Usually they grow into a perl thing though. Always using a system() wrapper that dies nicely on errors.

    For calculations I use "bc". The 3 second bc guide will instruct you to use


    as your first command.

    I also use awk '{print $1}' once in a while instead of "perl ... (split)[0]". Why? No clue. :-) The fingers are doing it.

    -- ask bjoern hansen [], !try; do();

  • I've been using dc for years. It got to the point where I had an xterm alias in my WindowMaker menu for dc that I used constantly.

    Unfortunately, I don't have a three-key shortcut to bring up dc on OS X yet...