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.
  • Fat comma (Score:3, Insightful)

    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.