in reply to referances of hashes, and subroutines

that error is because you didnt pass the variable correctly. The shift will take the first element off of an array so...
sub change{ my %A = @_;