in reply to Re: search array for item, move to next item
in thread search array for item, move to next item
Or, to avoid accidents:
which:if ($args =~ /(?:\A|\s)-iL(?:\s+([^\s]+)|\s*\Z)/) { print "Found -iL, the value is ", (defined($1) ? "'$1'" : 'absent'), + "\n" ; }
Sadly, this doesn't look as pretty any more :-(
Oh. And FWIW, none of this will cope if the $arg string contains quoted elements -- something way smarter is required !
|
|---|