[sf-perl] Anyone know of anything like File::Size::Human?

George Hartzell hartzell at alerce.com
Thu Apr 11 11:36:29 PDT 2013


I'd like to convert strings like 100KB or 2TB into the appropriate
numbers (102400 bytes, etc..).

In the long run I'd also like to convert comparison operators into
subroutines that test that operator, e.g.

  '> 100KB'

becomes

  my $test = sub { return -s $_[0] > 102400 }

or something similar (untested example...).

Seems like this must already be sitting on a disk somewhere.  Anyone
seen it?

g.


More information about the SanFrancisco-pm mailing list