http://www.perlmonks.org?node_id=674156


in reply to Help in reading log file

Hi

On modifying your code, you can try like this,

open (FH,"$file") || die ("could not openfile"); my @arr; while (<FH>) { chomp; push @arr , $1 if $_ =~ /\s+(\/\/.+)/; }

Punitha