Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^7: When every microsecond counts: Parsing subroutine parameters

by talexb (Chancellor)
on May 18, 2008 at 16:52 UTC ( [id://687219]=note: print w/replies, xml ) Need Help??


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

        Reread the post.
        C:\camelbox\bin>perl -e "sub foo{ print join '#',@_; } foo(1,,,,,2);" 1#2


        holli, /regexed monk/
        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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://687219]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-25 16:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found