Gerard ter Haar wrote: > Hi! > > I have a hash related question. Thanks in advance for your assistance! > > I have quite a large number of values in a hash: > > $errs->{ err_main_notfound } = "file not found. check config."; > $errs->{ err_main_perms } = "no permissions, check docs".; > $errs->{ err_main_unknown } = "unknown error occured."; > > Now I would like to remove the _main part of the hash keys, so I would get: > $errs->{ err_notfound } = "file not found. check config."; > $errs->{ err_perms } = "no permissions, check docs".; > $errs->{ err_unknown } = "unknown error occured."; > > How can I accomplish this using some perl statements?
One way would be copy it and delete the old: $errs->{err_notfound} = $errs->{err_main_notfound}; delete $errs->{err_main_notfound}; -- ,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED] (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (My Perl/Lakers stuff) _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs