Or to grab a single row from a database you could do this@$hashref{keys %some_hash} = values %some_hash;
Of course this assumes you're only selecting one row from the database and is only really for demonstrative purposes.my %data = %{$dbh->selectall_hashref()->[0]};
broquaint
In reply to Re: Slicing a hashref
by broquaint
in thread Slicing a hashref
by George_Sherston
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |