Problems? Is your data what you think it is? | |
PerlMonks |
Re: Store and print multiple stringsby roboticus (Chancellor) |
on Mar 12, 2018 at 13:33 UTC ( [id://1210714]=note: print w/replies, xml ) | Need Help?? |
I'm having a bit of difficulty figuring out what you're asking, but if I understand correctly, you expect the second part of your output to look like:
If I've guessed correctly, then the problem is that you're assigning an array to a scalar in this line:
and the way to fix it is to create an array reference, and put that into the hash like this:
You might consider tuning up your question a bit, in order to make it more accurate, and easier to see what you're asking. Your code doesn't show how you're printing your values out Update: Struck out incorrect statement, as AnomalousMonk pointed out that the regex actually does capture the tilde (because I didn't read the regex carefully enough, I overlooked the '.'). ...roboticus When your only tool is a hammer, all problems look like your thumb.
In Section
Seekers of Perl Wisdom
|
|