Try using grep to narrow your list.
You'll also want to look at perlre and perlreref.
Thank you for identifying this post as homework. You could have just posted without identifying your question and fished for a complete answer. Instead, you showed that you value your education enough to work at it.
TGI says moo
In reply to Re: **HomeWork** Trying to search an array and match it to a user input
by TGI
in thread **HomeWork** Trying to search an array and match it to a user input
by trenchwar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |