go ahead... be a heretic | |
PerlMonks |
Grep & Regex Questionby jdlev (Scribe) |
on Dec 01, 2013 at 08:04 UTC ( [id://1065121]=perlquestion: print w/replies, xml ) | Need Help?? |
jdlev has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to do something pretty simple, but can't get it to work. I have an array. I want to ask the user if they want to remove an element. If they do, it will delete the element from the array and rebuild the array. So for instance, if I have the following: @array = qw(a b c); And the user enters "b", the array would become: @array = qw(a c); Grep doesn't seem too fond of feeding it variables though. Anyways, here's my code:
I love it when a program comes together - jdhannibal
Back to
Seekers of Perl Wisdom
|
|