Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

•Re: Re: Re: Lexicals in if() scope gotcha!

by merlyn (Sage)
on Mar 31, 2004 at 12:27 UTC ( #341280=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Lexicals in if() scope gotcha!
in thread Lexicals in if() scope gotcha!

There's a for-loop, with three expressions (sometimes called "C-style for").

There's a foreach-loop, with single scalar (sometimes implied with $_) and a list of values to be walked (sometimes called a "csh-style foreach").

They're definitely two different kinds of loops. However the text for and foreach may be used to introduce either one. The actual loop-style is determined by what follows.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on •Re: Re: Re: Lexicals in if() scope gotcha!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://341280]
[ozboomer]: Howdy, all.. Trying this once more... Not really a perl question :(... but I don't know how to even title my query (more...)
[ozboomer]: There's a text file with lots of sections in it, like an '.ini/.conf' file. Each section can be 'used' or 'unused' by its application (more...)
[ozboomer]: Some folk want to use the text file as 'storage', keeping ALL items in it (a database); others call it an 'active document' that should only contain 'in-use' sections. Is there a 'good practice' for this sort of thing?

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2018-05-21 00:23 GMT
Find Nodes?
    Voting Booth?