I want to search an array for an arbitrary sting variable. All the examples I've found use regular expressions. Is there a way to devise a regular expression that includes an arbitrary string variable (unknown in advance)?
For example:
my #string_to_find = 'hidden'; my @array_to_search = ('Foo', 'whathiddenever', 'Bar', '12hidden456');
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |