$size = $chunk_size =~ /(\d+)g/i ? $1 * 1024*1024*1024 : $chunk_size =~ /(\d+)m/i ? $1 * 1024*1024 : $chunk_size =~ /(\d+)k/i ? $1 * 1024 : # easy addition $chunk_size;