Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: grep integer and fractional part from a division (modulus ?)

by Samy_rio (Vicar)
on Aug 11, 2006 at 11:53 UTC ( [id://566793]=note: print w/replies, xml ) Need Help??


in reply to grep integer and fractional part from a division (modulus ?)

to grep the integer and fractional part, from a division, into 2 different variables
(everything in 1 line :)

Try like this,

use strict; use warnings; my ($a, $b) = (301 / 60) =~ m/^([^\.]+)\.?([^\.]*)$/; print "$a\t$b\n";

Regards,
Velusamy R.


eval"print uc\"\\c$_\""for split'','j)@,/6%@0%2,`e@3!-9v2)/@|6%,53!-9@2~j';

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://566793]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (1)
As of 2024-04-25 04:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found