equal
deleted
inserted
replaced
243 my @units = qw(B K M G T); |
243 my @units = qw(B K M G T); |
244 while (length int > 3 and @units) { |
244 while (length int > 3 and @units) { |
245 $_ = sprintf "%.1f" => $_ / 1024; |
245 $_ = sprintf "%.1f" => $_ / 1024; |
246 shift @units; |
246 shift @units; |
247 } |
247 } |
248 croak "filesize is too big (can't convert to human readable number" |
248 croak "filesize is too big (can't convert to human readable number)" |
249 if !@units; |
249 if !@units; |
250 return "$_$units[0]"; |
250 return "$_$units[0]"; |
251 } |
251 } |
252 |
252 |
253 sub confirm { |
253 sub confirm { |