To add a little emphasis to AnomalousMonk's sage advice: always use strictures (use strict; use warnings; - see The strictures, according to Seuss).
In addition always use three parameter open, lexical file handles and report open errors. Consider:
open my $ranIn, '<', $logFileName or die "Open '$logFileName' failed: +$!\n";
There are at least three important points here. Using a lexical file handle ($ranIn in the sample) reduces the likely hood of a typo in the file handle name resulting in strange and hard to debug runtime errors. Using the quotes around the file name in the die helps see unexpected white space and newlines (commonly from unchomped input data). And the explicit open mode helps avoid errors such as opening a file for input (the default) then trying to write to it, or executing arbitrary user supplied command lines when the file name is supplied at run time.
In reply to Re: Issue splitting in while Loop
by GrandFather
in thread Issue splitting in while Loop
by savem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |