Help for this page
$_ = ''; if ( open( INPUT, "<", $file )) { ... next; } # now it will be easier to categorize/parse $_ ...