It appears that lines with -// are included because you don't anchor the pattern /\s+\/\// to the beginning of the line. So it looks like you probably want something like:
open FH, '<', $file or die "could not open '$file' $!"; my @arr; while ( <FH> ) { chomp; push @arr, $_ if s!^\s+(?=//)!! ; } foreach ( @arr ){ print "$_\n"; }
In reply to Re: Help in reading log file
by jwkrahn
in thread Help in reading log file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |