Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Re: (Golf) Formatting Integer To Money

by xylus (Pilgrim)
on Aug 29, 2002 at 17:36 UTC ( [id://193834] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub a{$_=pop;{s/(\d)(\d{3})(?!\d)/$1,$2/&&redo}$_.'.00'}
    
  2. or download this
    perl -e '$_=$0;split??;chop$_;$;=pop@_;$;++for(0..9060420);$_.=reverse
    +$;;print'