[Bio] / FigKernelPackages / raelib.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/raelib.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.29, Sun Feb 5 01:08:16 2006 UTC revision 1.30, Fri Feb 10 00:39:30 2006 UTC
# Line 770  Line 770 
770    
771    
772    
773    =head1 commify
774    
775    Put commas in numbers. I think this comes straight from the perl cookbook and is very useful for nice displays
776    
777    =cut
778    
779    sub commify {
780        my($self,$n) = @_;
781        my(@n) = ();
782        my($i);
783    
784        for ($i = (length($n) - 3); ($i > 0); $i -= 3)
785        {
786            unshift(@n,",",substr($n,$i,3));
787        }
788        unshift(@n,substr($n,0,$i+3));
789        return join("",@n);
790    }
791    
792    
793    
794    
795    
796  1;  1;
797    

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3