Whenever I'm using "if" loops, I always make sure to place an "else" as it helps with tracing. Especially in a situation like this, you would at least know that there wasn't a match:
if ($omething) { # do stuff } else { print "There was no match!\n"; # or some other error }
You could easily place in a more intuative error message. Even if this is only temporary to help you test the code, it's a worthwhile practice to get into.
--Coplan
In reply to Re: Trying to Create and Write to a file
by Coplan
in thread Trying to Create and Write to a file
by IPstacks
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |