Perl trivia question

Joel Meulenberg joelmeulenberg at yahoo.com
Wed Feb 16 19:59:44 CST 2000


> > if($v>int($v)){$v=int($v)+1;}
> 
> Just one quick suggestion:  If you're working with negative numbers,
> you may want to change it to:
> 
> if($v != int($v)){$v=int($v)+1;}

Sheesh, I shoulda thought about that more carefully.  It should be: 

if($v != int($v)){$v=int($v) + ($v > 0);}


__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com



More information about the grand-rapids-pm-list mailing list