Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: variable processing and checking in one statement (for my)

by tye (Sage)
on Aug 07, 2012 at 00:13 UTC ( #985855=note: print w/ replies, xml ) Need Help??


in reply to variable processing and checking in one statement

for my $t ( $test ) { doWith($t) if check($t); }

avoids $_ completely. Clearly not worth it if your variable is actually just $test.

- tye        


Comment on Re: variable processing and checking in one statement (for my)
Select or Download Code
Replies are listed 'Best First'.
Re^2: variable processing and checking in one statement (for my)
by saunderson (Novice) on Aug 07, 2012 at 00:29 UTC
    Thank you for your contribution. the for respectively the foreach approach will cetrainly find their ways in my future scripts ...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2015-08-31 20:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (364 votes), past polls