in reply to Re^6: When every microsecond counts: Parsing subroutine parameters
in thread When every microsecond counts: Parsing subroutine parameters

Brilliant. Yet another clever way that Perl takes care of things automagically.

I hadn't realized that, because I wasn't thinking Perlishly enough. Thank you.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

  • Comment on Re^7: When every microsecond counts: Parsing subroutine parameters

Replies are listed 'Best First'.
Re^8: When every microsecond counts: Parsing subroutine parameters
by blazar (Canon) on May 19, 2008 at 18:08 UTC

    I personally believe there's been some misunderstanding. Granted, I'm glad to receive your thanks, but I can't remember having pointed out any "clever way that Perl takes care of things automagically" in the post you're replying to. Did I?

    --
    If you can't understand the incipit, then please check the IPB Campaign.

      Yes, you did. I was complaining about having to call a sub as follows

      foo(100,undef,undef,undef,"bar");
      when in fact this can be shortened to
      foo(100,,,,"bar");
      However, as was pointed out by some kind monk, you're left to worry about counting commas, since ,,,, looks a lot like ,,,,, from a distance.

      Alex / talexb / Toronto

      "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

        when in fact this can be shortened to

        No, it can't! I was saying that sometimes I would like it to. Apologies if I didn't make it clear enough.

        --
        If you can't understand the incipit, then please check the IPB Campaign.
        Reread the post.
        C:\camelbox\bin>perl -e "sub foo{ print join '#',@_; } foo(1,,,,,2);" 1#2


        holli, /regexed monk/