Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I would like to open a file and if can not open, need to throw a message using Exception handling method(try-catch method).
How can i do that? I have written like this in normal method, how can i convert it try-catch method?
Can anyone post a solution here
Regards,
San
I would like to open a file and if can not open, need to throw a message using Exception handling method(try-catch method).
How can i do that? I have written like this in normal method, how can i convert it try-catch method?
open (FH, "directory/myfile") || die "Can Not open the file"; @array = <FH>; close(FH);
Can anyone post a solution here
Regards,
San
Back to
Seekers of Perl Wisdom