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