![]() |
|
XP is just a number | |
PerlMonks |
Re: Bidirectional lookup algorithm? (Updated: further info.)by shmem (Chancellor) |
on Jan 05, 2015 at 18:02 UTC ( [id://1112214]=note: print w/replies, xml ) | Need Help?? |
Since your strings and integers are unique - why don't you use a hash for strings and an array for integers
and look up the strings by index into the array, and the integers by key into the hash?
perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
In Section
Seekers of Perl Wisdom
|
|