--- nfo/perl/libs/shortcuts/files.pm 2003/02/11 09:50:00 1.1 +++ nfo/perl/libs/shortcuts/files.pm 2003/02/20 21:12:24 1.2 @@ -1,7 +1,10 @@ ## --------------------------------------------------------------------------- -## $Id: files.pm,v 1.1 2003/02/11 09:50:00 joko Exp $ +## $Id: files.pm,v 1.2 2003/02/20 21:12:24 joko Exp $ ## --------------------------------------------------------------------------- ## $Log: files.pm,v $ +## Revision 1.2 2003/02/20 21:12:24 joko +## + prints to STDERR if logfile could not be opened +## ## Revision 1.1 2003/02/11 09:50:00 joko ## + code from Data::Storage::Handler::File::Basic ## @@ -35,6 +38,10 @@ sub f2s { my $filename = shift; + if (! -e $filename) { + print STDERR __PACKAGE__ . ':' . __LINE__ . ": File $filename does not exist!" . "\n"; + return; + } # read file at once (be careful with big files!!!) open(FH, '<' . $filename); my @buf_arr = ;