Subject: | cache-size setting ending in K or M causes warning and 0 cache size. |
my %Sizes = (k => 1024, m => 1024*1024);
# ... stuff ...
$cache_size *= $Sizes{$1} if $cache_size =~ s/([km])$//i;
Might be better written like this:
$cache_size *= $Sizes{ lc($1) } if $cache_size =~ s/([km])$//i;
or this:
$cache_size *= $Sizes{ $1 } if $cache_size =~ s/([km])$//;
Depending on whether or not you want to be case-insensitive with the suffix.