Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Learning perlisms leads to experience, wisdom and discoveries that whitespace & idioms are lazy

by diotalevi (Canon)
on Dec 23, 2004 at 07:59 UTC ( [id://417020]=note: print w/replies, xml ) Need Help??


in reply to Learning perlisms leads to experience, wisdom and discoveries that whitespace & idioms are lazy

I hope that no one reads your node and gets the idea that hash slices are somehow exotic. They aren't. Substituting in a loop is baby perl and while there there are places where that is appropriate and good, there are plenty of places choosing slower but simpler for newbies isn't the right decision. Personally, I'd never consider the looped version "correct" unless there was a really good reason to use the other version.

Also, did you mean to link to anything in particular with each of your [linked] nodes? Maybe you meant to make them [google://Google.com links]?

  • Comment on Re: Learning perlisms leads to experience, wisdom and discoveries that whitespace & idioms are lazy

Replies are listed 'Best First'.
Re^2: Learning perlisms leads to experience, wisdom and discoveries that whitespace & idioms are lazy
by kappa (Chaplain) on Dec 23, 2004 at 13:06 UTC
    By the way, do you know why the hash slice method is faster than looping? I measured and looks like it really is and by a significant amount of up to 25%. Seems strange.
    --kap

      Hash slicing does the assignment loop in C; explicitly looping does it in Perl.

Re^2: Learning perlisms leads to experience, wisdom and discoveries that whitespace & idioms are lazy
by castaway (Parson) on Dec 23, 2004 at 09:39 UTC
    I second dios question, what are all those internal links for? (It's distracting me from actually reading the content)

    C.

      Maybe he just meant to underline certain keywords? Putting brackets around something is easier than adding <u></u> or <b></b>, but the links are very distracting. I kept hovering my mouse over them to see what they link to, but almost all of the links are just the word itself, which leads me to the preceding conclusion.

Log In?
Username:
Password:

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

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

    No recent polls found