Perl-Sensitive Sunglasses | |
PerlMonks |
Re: search and return values from an arrayby thanos1983 (Parson) |
on Feb 14, 2018 at 16:45 UTC ( [id://1209150]=note: print w/replies, xml ) | Need Help?? |
Hello Gtforce, You can use something like that:
What I did above is split each array element based on space between strings. Then simply I used the first element as a key to the hash and the second as the value. Update: If you prefer one liner:
Hope this helps, BR.
Seeking for Perl wisdom...on the process of learning...not there...yet!
In Section
Seekers of Perl Wisdom
|
|