in reply to passing paramters to a sub

Or you could pass the scalar first, like:

sub whatever { my $scalar = shift; my %hash = @_; }

Then call it like:

whatever($scalar, %hash);
This also passes by VALUE not by reference... so in the other examples of passing a hashref, if you modify the hash inside your sub, it will modify it globally. In this case, you will get copies of your hash (assuming it doesn't also contain references), so if you modify it, it won't show up in the outer part of the program (just in your sub).