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

Re: Re: Re: Re: Why do we say the =~ operator "binds"?

by diotalevi (Canon)
on Apr 18, 2004 at 15:41 UTC ( #346109=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: Why do we say the =~ operator "binds"?
in thread Why do we say the =~ operator "binds"?

I just grepped my source repository to see where I'd written that and I couldn't find it. The general case I'd thought of where it was annoying or inconvenient to the narrative to give the topicalized variable a name. I can't find an example (though I did just find a code-typo in Switch.pm where ~= was said instead of =~).

for ( ... ) { $foo = /.../; }


Comment on Re: Re: Re: Re: Why do we say the =~ operator "binds"?
Download Code
Re: Re: Re: Re: Re: Why do we say the =~ operator "binds"?
by William G. Davis (Friar) on Apr 18, 2004 at 22:11 UTC

    It's *almost never* annoying or inconvenient to the narrative to give topicalized variables names.

    The loop is the discussion and the alias variable is what's being talked about. It's the topic--the subject--and it has a name, even if you don't feel like giving it one. And using "for" when you really mean "foreach" element in some list doesn't help anyone either (again, when the code's for public consumption, not when it's just for you.)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (20)
As of 2014-07-29 13:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (217 votes), past polls