X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=SCP.pm;h=f0fd8eace70758ae4cbe7ad2189c7b200b714ce4;hb=aa6d6c889e19664fd73daac1d60aeb544faf3015;hp=6a25ccd3905149ce2a42396ae48a4e5846a9e053;hpb=d2320ef628c4b6261c7e0dbdaf6103ae7ec518a3;p=Net-SCP.git diff --git a/SCP.pm b/SCP.pm index 6a25ccd..f0fd8ea 100644 --- a/SCP.pm +++ b/SCP.pm @@ -237,7 +237,7 @@ sub size { 0; } else { chomp( my $size = <$reader> || 0 ); - if ( $size =~ /^\s+(\d+)/ ) { + if ( $size =~ /^\s*(\d+)/ ) { $1 ? $1 : '0e0'; } else { $self->{errstr} = "unparsable output from remote wc: $size"; @@ -278,6 +278,8 @@ sub binary { 1; } Ivan Kohler Anthony Deaver +Thanks to Jon Gunnip for fixing a bug with size(). + =head1 BUGS Still has no-OO cruft.