http://qs321.pair.com?node_id=728549


in reply to Re: how to comment the lines if found a match
in thread how to comment the lines if found a match

Would you mind, if I suggest very small suggestion to your code?

$! will give more information regarding the type of failure

open (FILE_A, "$file_a") or die "couldn't open the file!"; >>open (FILE_A, "$file_a") or die "couldn't open the file $file_a <$!> +!";
close function will also fail, its better to check that as well

close (FILE_A); >>close (FILE_A) or die "Unable to close file";

Replies are listed 'Best First'.
Re^3: how to comment the lines if found a match
by kavitha (Initiate) on Dec 08, 2008 at 23:44 UTC
    Thanks alot. This works exactly how I want. Thanks for all your support.