Convert Memory Size (Human readable) into Actual Number (bytes) in Perl

Posted by neversaint on Stack Overflow See other posts from Stack Overflow or by neversaint
Published on 2010-04-01T01:35:57Z Indexed on 2010/04/01 1:43 UTC
Read the original article Hit count: 405

Filed under:
|
|

Is there an actual package in CPAN to convert such string:

my $string = "54.4M"
my $string2 = "3.2G"

into the actual number in bytes:

54,400,000
3,200,000,000

And vice versa.

© Stack Overflow or respective owner

Related posts about perl

Related posts about unix