| [reply] |
What do you mean by 'looks at'?
Are you trying to prevent some code from being compiled?
In that case you can't do it using exit as Perl
compiles the whole file before executing it.
Perhaps you could comment out the code that you don't
want compiled? Using =pod ... =cut is a good way
to comment out large chunks of code.
--
<http://www.dave.org.uk>
"Perl makes the fun jobs fun
and the boring jobs bearable" - me
| [reply] |
Well, If you're looking to put stops in the code that will exit after an "error", you can use the die command.
open(FH,"log.log") || die "Cannot open log.log : $!\n";
After looking at your other question, and trying to answer it, I would suggest reading "Learning Perl, 2nd Edition".
Go to www.oreilly.com and check it out.
Remember : Always search the perlmonks.org site for keywords before asking a question. If you don't find it here, try www.google.com. If you don't find it there, ask away. :)
Azatoth a.k.a Captain Whiplash
Get YOUR PerlMonks Stagename here!
| [reply] [d/l] |
You probably want to try commenting said code out. The interpreter will compile any code it finds. As far as Perl knows, your exit could be on only one branch of a conditional statement.
POD format commenting is a good way to comment out large chunks of code.
-kel | [reply] |