Can't split() from %Hash element

Have a hash table with tab delimited elements. 'split()' won't break out the tokens of the hash element. Short of moving the hash element to a scalar before the split, is there anyway to access the tokens directly from the hash element?

ie:
$Presidents{"Nixon"} = "Pat\tTricia";
($Wife,$Daughter) = split("\t",$Presidents{"Nixon"});

This does not work. The scalars remain undefined.
snazzyragsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

prakashk021799Commented:
Change this line:
%Presidents{"Nixon"} = "Pat\tTricia";

to:

$Presidents{"Nixon"} = "Pat\tTricia";
0
snazzyragsAuthor Commented:
Edited text of question.
0
snazzyragsAuthor Commented:
Sorry, the first line was in error. However, the problem is in the second line. The content of the hash was intact, but cannot split it out.
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

ozoCommented:
The second line should work.  How did you determine that it wasn't working?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
helverCommented:
try:

($Wife,$Daughter) = split(/\t/,$Presidents{"Nixon"});
0
snazzyragsAuthor Commented:
You are correct - there was nothing wrong wiht the sample code I provided in the question. I should have tried it out - I would have answered my own question. The sample code was a paraphrase of the real code which was a very long hash value from a spreadsheet (of several columns). Problem was that I had left out one column definition, which shifted my variables into empty cells - therefore, undefined. When I printed the values in a debug statement, they were, naturally, undefined. Hence, my assumption that the code was not working. Thanks, for the simple, but definitive answer. It was your short, no-nonsense unquestionable response that made me review the code and find the problem. Thanks, Doug.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Perl

From novice to tech pro — start learning today.