in reply to Map not giving me what I thought it would.
my @array = map { (split(/^-/,$_))[0] . (split(/^-/,$_))[1] } @ARGV;
I think that'll work, assuming you want your command line arguments in @array whether they have leading hyphens or not, but, even if it does work, it's lousy code. Surely there's a better way, but I'm too tired to see it.
They laughed at Joan of Arc, but she went right ahead and built it. --Gracie Allen
|
|---|