Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://295869]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2018-05-28 10:41 GMT
Find Nodes?
    Voting Booth?