diff options
Diffstat (limited to 'fml/lib/File')
| -rw-r--r-- | fml/lib/File/CacheDir.pm | 4 | ||||
| -rw-r--r-- | fml/lib/File/Utils.pm | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/fml/lib/File/CacheDir.pm b/fml/lib/File/CacheDir.pm index f676dbc4..32622951 100644 --- a/fml/lib/File/CacheDir.pm +++ b/fml/lib/File/CacheDir.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: CacheDir.pm,v 1.21 2002/09/28 09:27:43 fukachan Exp $ +# $FML: CacheDir.pm,v 1.22 2002/12/23 14:34:22 fukachan Exp $ # package File::CacheDir; @@ -278,7 +278,7 @@ sub get_latest_value opendir($dh, $dir); my @dh = (); - for (readdir($dh)) { push(@dh, $_) if /^\d+/;} + for my $dir (readdir($dh)) { push(@dh, $dir) if $dir =~ /^\d+/;} @dh = sort { $b <=> $a } @dh; eval q{ use File::Spec;}; diff --git a/fml/lib/File/Utils.pm b/fml/lib/File/Utils.pm index e857fe56..d62ed8f9 100644 --- a/fml/lib/File/Utils.pm +++ b/fml/lib/File/Utils.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Utils.pm,v 1.20 2003/01/11 15:14:23 fukachan Exp $ +# $FML: Utils.pm,v 1.21 2003/01/11 15:16:33 fukachan Exp $ # package File::Utils; @@ -237,8 +237,9 @@ sub append my $wh = new FileHandle ">> $dst"; if (defined($rh) && defined($wh)) { - while (<$rh>) { - print $wh $_; + my $buf = ''; + while ($buf = <$rh>) { + print $wh $buf; } $wh->close(); $rh->close(); |
