Hi all,

Quick question in for those perl programmers.. here is an extract of some of my 
code..

open(DATA, $stats_file) || die "Can't open $stats_file: $!";

while (<DATA>)
{
    my ($data1,$data2);
    chop;
    ($data1,$data2) = split(/,/);
    print "$data1\n";
    print "$data2\n";
}
close(DATA);

Now my question is, $data1 and $data2 are numbers, sometimes for example 100,10 
while at other times 100.5,10.6

My question is, how can I implement some code into the above, so that when the 
two print statements run, it rounds up any such 100.5,10.6 code to normal 
101,11.

Basically I don't want decimal points in the final output.

Hope someone can help.

Cheers
Michael
--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text

Reply via email to