Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Using loops inside an 'if' statement

by thens (Scribe)
on Oct 02, 2003 at 09:39 UTC ( #295869=note: print w/ replies, xml ) Need Help??


in reply to Using loops inside an 'if' statement

There is no such rule that you cannot put a while statement inside a if loop

You are doing something else which you havent shown us here that is causing the problem. Please post the actual code here for the monks to understand your problem and suggest solutions.

I can give you a few suggestions. None of it may be relevant to this problem. But these are good practices that you should follow while coding in perl.

  • All perl programs should have 'use strict' and 'use warnings'. This will help you catch many errors.
    use strict; use warnings; # # Your code here #
  • If you are not able to comprehend a error message. 'use diagnostics' will give you more details about the error message and what may be the possible cause for it.
  • perldoc is the definitive source of information for all related questions. Consult the doc before you ask anyone else.
    $perldoc <Module name> # for documentation of the modules $perldoc -f <function> # eg perldoc -f fork $perldoc -q "HTML parsing" # search the perlfaq $perldoc perldoc # for documentation on perldoc

Hope this helps

-T


Comment on Re: Using loops inside an 'if' statement
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (15)
As of 2014-12-18 18:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (59 votes), past polls