in reply to Re: replace number by args<number>
in thread replace number by args<number>

Maybe someone could suggest how to write the map block in a nicer way? It looks a bit clumsy.
I agree it looks clumsy. But, IMO, the clumsy part is using split, map and join. Why?
$yourInputGoesHere =~ s/([0-9])/args$1/g;
No split. No map. No join. Nothing clumsy here.

Replies are listed 'Best First'.
Re^3: replace number by args<number>
by rovf (Priest) on Mar 20, 2009 at 12:13 UTC

    Oh my god! I didn't see the obvious :-O

    -- 
    Ronald Fischer <ynnor@mm.st>