in reply to Print a hash in order

The order of the elements of a hash is undefined. You can use Tie::IxHash for a hash implementation that retains the order of its elements, but usually there are simpler ways to obtain the same result with perl builtins, for instance:
my @perm_names = qw(ATM_NO ATM_R ATM_W ATM_D ...); my %perms; @perms{@perm_names} = ( 'No access to ATMs', 'Read ATMs', 'Write ATMs', 'Modify ATMs', ... ); for (@perm_names) { print "\nINSERT INTO permissions SET name='$_', description='$perms{ +$_}'\n"; }