Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by Samy_rio (Vicar)
on Aug 11, 2006 at 11:53 UTC ( #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
Node Status?
node history
Node Type: note [id://566793]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (1)
As of 2018-07-22 01:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (451 votes). Check out past polls.

    Notices?