See? Only one major...$ perl -d Default die handler restored. Loading DB routines from perl5db.pl version 1.07 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. $students{"Mary Pitts"}=( { "year"=>"4", "GPA"=>"4", "major"=>"Economics", "major"=>"Economics", "email"=>"mpitts\@school.edu" } ); print "Mike was here..."; main::(-:1): $students{"Mary Pitts"}=( main::(-:2): { main::(-:3): "year"=>"4", main::(-:4): "GPA"=>"4", main::(-:5): "major"=>"Economics", main::(-:6): "major"=>"Economics", main::(-:7): "email"=>"mpitts\@school.edu" DB<1> n main::(-:11): print "Mike was here..."; DB<1> x %students 0 'Mary Pitts' 1 HASH(0xa038a8c) 'GPA' => 4 'email' => 'mpitts@school.edu' 'major' => 'Economics' 'year' => 4
Are you saying you want an error to occur when a duplicate value is attempted? A large debate occurred on p5p recently (a few months ago) about clamped hashes, but I don't remember what the outcome was, or whether the feature will be in 5.8.
--
Mike
In reply to Re: Re: Delete repeated Hash's / HOH's
by RMGir
in thread Delete repeated Hash's / HOH's
by juve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |