<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:courier,monaco,monospace,sans-serif;font-size:10pt"><div style="font-family: courier,monaco,monospace,sans-serif; font-size: 10pt;">Here is my solution for fun:<br>perl -e '$t=13.32; $t =~ s/(\d+)(\.\d+)/$1.":". (int $2*60 + .5&lt;10?"0":"").int $2*60 + .5/e; print "$t\n"'<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Richard Reina &lt;richard@rushlogistics.com&gt;<br>To: chicago-talk@pm.org<br>Sent: Saturday, January 5, 2008 3:36:48 PM<br>Subject: [Chicago-talk] isolating the values to right and left of the decimal<br><br>
After over an hour of googling and searching in my Lama, Camel and Ram books I still am unable to find a way to convert<br><br>13.32 to: thirteen hours and nineteen minutes<br><br>my $time_sring = 13.32;<br><br>my $hrs = sprintf "%0d", $time_string;&nbsp; # works. I get 13<br><br>but I can't figure out how to get .32 so that I can multiply it time 60 and then round it so that I can print out:<br><br>thirteen hours and nineteen minutes<br><br>Any help would be greatly appreciated.<br><br>Thanks,<br><br>Richard<br><br><br><br><br><br><br>Your beliefs become your thoughts.  Your thoughts become your words.  Your words become your actions.  Your actions become your habits.  Your habits become your values.  Your values become your destiny.  -- Mahatma Gandhi</div><br></div></div></body></html>