Re: Super regexp to format numbers

"A. Pagaltzis" <[email protected]> Mon, 28 Aug 2006 21:22:09 +0200
Newsgroups gmane.comp.lang.perl.fun
Message-ID <20060828192209.GA22525@klangraum>
* Alexandre Jousset <[email protected]> [2006-08-28 18:15]:
> For the moment I have a (too) complicated sub spacify and I would 
> like to simplify it to a regexp.

It doesn’t have to be complicated, even without a regexp.

    scalar reverse join ' ', unpack '(A3)*', reverse $num;

Regards,
-- 
#Aristotle
*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;