Edward WIJAYA <[EMAIL PROTECTED]> asked: > How can I take out/splice(?) the element of that hash that > start with '1' and store it into another hash. So in the end > I will have two hashes:
Off the top of my head, I'd say my @temp = grep /^1/, keys %myhash; my %myNEWhash; foreach my $k (@temp){ $myNEWhash{$k} = myhash{$k}; delete myhash{$k}; } HTH, Thomas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>