[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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@mutationgrid.com | http://mutationgrid.com | 1-402-598-7782