[Omaha.pm] use POSIX qw(ceil);

Jay Hannah jhannah at mutationgrid.com
Tue May 31 13:10:18 PDT 2011


Hey, ceil() sure is handy. People tend to register for conferences at the last minute so I need to apply a ratio multiplier to the numbers I already have to tell the print shop what to print.

ceil() rounds up for me.   :)

https://github.com/perigrin/YAPC-NA-2011/blob/master/asheville_businesses/shirts.pl

$ ./shirts.pl 
143 sizes are declared. The target is 350, so we're multiplying by 2.4 and then rounding up.
  5 4XL
 76 L
  3 L (W)
 81 M
  3 M (W)
 10 S
  5 S (W)
 96 XL
  5 XL (W)
 13 XLT
  5 XS
  3 XS (W)
 18 XXL
  8 XXL (W)
 13 XXLT
 13 XXXL
New total is 357

IRC++ CPAN++ POSIX++    :)

Jay Hannah
Software Architect
jhannah at mutationgrid.com | http://mutationgrid.com | 1-402-598-7782





More information about the Omaha-pm mailing list