Trying to use floor:

[EMAIL PROTECTED] test]$ /home/tom/mk4/perl/test_floor.pl
enter a number to be floored 3.557
Undefined subroutine &main::floor called at
/home/tom/mk4/perl/test_floor.pl line 8, <> line 1.
[EMAIL PROTECTED] test]$  

Here is the code:

#!/usr/bin/perl -w
use strict;
use warnings;
my $foo = 0;
my $goo = 0;
print "enter a number to be floored ";
$foo = <>;
$goo = floor($foo);
print "floor is $goo \n";

0) My first post here - please correct me if I am not using correctly
I am an engineer not a professional programmer so please don't tell
me you do it just like in c. (an answer I often see in the doc)

1) I suspect a version problem since search indicates floor added after
5.0
How do I ask perl what version is installed?

2) I am running Mandriva 2006 on an Intel 64 bit dual, dual (very nice).
Running somewhat older version of Mandriva because I know it's bugs.

3) How would I download later version of perl if that is needed?

4) Looking at CPAN I see that math.ops has what I need.  How do I add
math.ops to my program?  I am a real beginner so I would need details.

Thank you people for doing this work.  If I knew what I know now, I
would
be trying to hire some of you to set up stuff to develop physics
instrumentation.  Still might get someone else to use perl for this
purpose.  Would this be the right place to start finding help?
    
-- 
  Thomas F. Droege
  [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to