in reply to How to open sub FH when filename is passed to sub?
BTW much more common ideom for doing same thing (opening file and exiting with error in case of failure) is:unless (cpen (FH, $myhashname)) { print STDERR "Can not open file\"$myhashname\": $!n\n"; exit;}
open (FH, $myhashname) or die "Can not open file\"$myhashname\": $!";
--
Ilya Martynov
(http://martynov.org/)
|
|---|