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

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.
  • Somehow, and surprisingly, none of the iterator type modules I saw in a quick CPAN seach do the trick with less finger pain. But there's always the option of $_ if you don't need the lexical:

    for ( @files ) {
      # stuff

    For small scopes, I find I often revert to single letters.

    for my $f in ( @files ) {


  • After doing some java coding, I often get compilation errors in perl because I forget the $ in front of a variable :).

    Nothing that a few wtf's can fix...

  • I can't think of any non-perlisms leaking into my Perl, but I find myself typing this all the time in C# :

      public ovid foo() {
        // ...


    • Ovid's foo should be private, thank you.

      • I think you misread that. Anyone can ask foo() for an ovid. :-)
        • What does it return in ovid context?

          • What does it return in ovid context?

            It always returns ovid in an ovid context. In a strongly typed language, the compiler will never allow you to call it from a non-ovid context. I suppose you could overload foo() to return a virgil, horace, or even homer in other contexts, but I've never needed to do that.

            • If any dead Greek poet were polymorphic, I would have thought ovid!

              • He was considered a Roman poet, actually. Had Roman citizenship until he died, though he was never permitted to return to Rome after he was relegated (a form of exile).

  • I think that my most common 'non-perl-ism' would be 'elseif', easily fixable but still annoying, though that said I think that perl is a flexible enough base that we ~could~ address most of these (though ~should~ is a very different point). So, whats the next step? Do we write a bunch of editor hacks that clean up our fingers output? Do we start writing modules that allow for such errors to become valid?
  • I have started adding the "in" also.
    I also wrote this once:

        my @list = for $i in @source when $i > 42 collect "OH, $i";

    It turns out that Perl can't parse that :)