in reply to Parsing arguments with surrounding garbage.

That doesn't look so inelegant to me, but here's a way that avoids the substitution, FWIW (though I'm sure someone can do better):
$string = 'garbage validcommand 1234 221 garbage 999 213'; $string =~ m/validcommand\s+((\d+\s+)+)/; @args = split ' ',$1;

--
I'd like to be able to assign to an luser