open (FILE,"file"); @file=; close(FILE); for ($i=0; $i<=$#file; $i++) { # Here I'm trying to catch the comments and ignore them if ($file[$i]=~/\/\*/) { # If comment is found ... while ($file[$i]!~/\*\//) { $i++; } # Check lines till finding end of comment next; } ... processing data ... }