Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Using loops inside an 'if' statement

by thinker (Parson)
on Oct 02, 2003 at 09:36 UTC ( #295868=note: print w/replies, xml ) Need Help??


in reply to Using loops inside an 'if' statement

Hi jonnyfolk,

There is nothing wrong with putting a while in an if statement. The problem you have is a syntax error. Change

while (<FILE)> { to while (<FILE>) {

Notice the order of the brackets

Hope this helps

thinker

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://295868]
help
Chatterbox?
[erix]: let's invade Hungary
[planetscape]: darn
[erix]: probably on holiday, the slacker
erix is reduced to use a BROWSER. (remember those?)
[Discipulus]: figuring.. i'm still just use the side pm chat..
[erix]: (all this while karls guitar gently weeps...)
[planetscape]: (invade Hungary)++ #I'm hungry
[stonecolddevin]: i went too far down the irc rabbithole to hook this back up there
[Discipulus]: .. yes erix until NodeReaper put jhon coltrane again

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2017-06-22 21:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (531 votes). Check out past polls.