| 2 |
## $Id$ |
## $Id$ |
| 3 |
## --------------------------------------------------------------------------- |
## --------------------------------------------------------------------------- |
| 4 |
## $Log$ |
## $Log$ |
| 5 |
|
## Revision 1.2 2003/02/20 21:12:24 joko |
| 6 |
|
## + prints to STDERR if logfile could not be opened |
| 7 |
|
## |
| 8 |
## Revision 1.1 2003/02/11 09:50:00 joko |
## Revision 1.1 2003/02/11 09:50:00 joko |
| 9 |
## + code from Data::Storage::Handler::File::Basic |
## + code from Data::Storage::Handler::File::Basic |
| 10 |
## |
## |
| 38 |
|
|
| 39 |
sub f2s { |
sub f2s { |
| 40 |
my $filename = shift; |
my $filename = shift; |
| 41 |
|
if (! -e $filename) { |
| 42 |
|
print STDERR __PACKAGE__ . ':' . __LINE__ . ": File $filename does not exist!" . "\n"; |
| 43 |
|
return; |
| 44 |
|
} |
| 45 |
# read file at once (be careful with big files!!!) |
# read file at once (be careful with big files!!!) |
| 46 |
open(FH, '<' . $filename); |
open(FH, '<' . $filename); |
| 47 |
my @buf_arr = <FH>; |
my @buf_arr = <FH>; |