Jan-Henrik wrote:
Dear Group,
I'm new to Perl and I have a simple question:
I ask for the entry of a number vie <STDIN>:
----------------------------------------
#!/usr/bin/perl -w
use strict;
my $foo;
print "Enter number: ";
$foo = <STDIN>;
comp($foo);
----------------------------------------
Now I would like to check wether the user really entered a number and
not letters. What would a check like that look like?
perldoc -q "How do I determine whether a scalar is a number"
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/