I'm sure this is covered by a Perl Module some where, but I haven't gone looking. Instead I've written and the re-written a function that will convert a raw number of bytes to something more human friendly.
Below you can see the two subroutines I've written over time.
The old one only went up to Petabyte (which is already larger than we will accept for a file). While usable it just seems clunky compared to the new function.