in reply to Getting the value out a hash

You need to read the docs for keys more carefully. It returns a list of, well, the keys. You then need to use those keys to extract the corresponding values out of your hash (my $fsize = $tag{ $word }).

Also the => operator isn't magic, it's just a special comma that does quoting in some cases of the thing to its left. my $tag1 = $words => $word is just a long winded way of writing my $tag1 = $words, $word, and that simply means my $tag1 = $word which probably isn't going to do anything useful.

Not to mention that there's really no reason to call int on a numeric value in this case (and if it were fractional running it through printf would truncate it to the whole part anyhow . . .).

The cake is a lie.
The cake is a lie.
The cake is a lie.