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.
  • Perl is like natural languages, it becomes more and more intuitive once you assimilate the idioms.

    Your code would be easier to read if you write
        { map {$$_[0] => $$_[1]} @$ref }
    to underline the fact it builds a hash. It's a common idiom.

    (On the other hand, you can write
        { map @$_, @$ref }
    as well. I wouldn't recommend it.)

    My learning of perl has not ended yet either. I don't think it's discouraging.
    • Like natural languages, you can talk baby talk in Perl and communicate usefully. And, like with natural languages, there are always new levels of mastery possible. Most of us are not yet capable of writing the equivalent of Romeo and Juliet in Perl.