Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Constants you cannot help but remember

by rdm (Hermit)
on Jun 10, 2004 at 01:36 UTC ( #362959=note: print w/replies, xml ) Need Help??


in reply to Re: Constants you cannot help but remember
in thread Constants you cannot help but remember

"You never have the right change for the meter"
The somewhat disturbing thing is the failure to context switch that I had reading this. It took me more than a minute to stop wondering what the exchange rate for yards to metres was at the retail level. And what the commission rate was.
"Excuse me, have you got change for a metre?"
"Sorry, I've only got a couple of decimetres..."
  • Comment on Re^2: Constants you cannot help but remember

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://362959]
help
Chatterbox?
[Lady_Aleena]: Why does grep(/.*$in.*/, @my_modules) work but grep { $_ =~ /.*$in.*/; $_ } @my_modules not work? What did I do wrong in the second?
[tobyink]: Why are you returning $_ n your grep block? You should return a boolean.
[tobyink]: *in your grep block
[tobyink]: You can use grep { $_ =~ /.*$in.*/; } @my_modules but why not stick to grep(/.*$in.*/, @my_modules)? (The latter is faster.)
[shmem]: Lady_Aleena, in the first example grep evaluates the result from grep and if true, returns $_. In the second, it always returns $_
[shmem]: ..the result from the pattern match

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2017-05-27 07:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?