in reply to Help in reading log file
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"; }
|
|---|