in reply to word with some number in between
What they’re all trying to say here is this:
- A regular expression /[0-9]/ will do nicely: you want an instance of a character in the inclusive range 0..9, anywhere in the string.
- The function grep() is a handy shortcut that, given a list, will return another list containing those entries in the first list that match the regex ... in this case, “your answer.”
In Section
Seekers of Perl Wisdom