G'day perlynewby,
"question 1 I don't understand why on INDEX, the warning says $string is undef? and I also had to declare it again as "my" when I did on pragma."
When you get a error (or warning), it's vitally important that you paste it verbatim, not just type in a vague facsimile of the message.
I strongly suspect that the error you got didn't mention $string at all; instead, it made reference to $tring! (Note the missing 's'.)
So, to fix, add the 's' and remove the my (which you added).
"question 2 whys is the '~~" operator method it's not working"
That's the smart-match operator. It's experimental and subject to change. I recommend you learn non-experimental Perl before delving into ~~.
-- Ken
In reply to Re^2: find a substring of unknow lenght if it is in a hash
by kcott
in thread find a substring of unknow lenght if it is in a hash
by perlynewby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |