Hello. I'm new in perl and have many questions.
This my first programm.
#!/usr/bin/perl
use strict;
use warnings;
my $number = 0;
my $_ = 0;
print "Enter number:";
chomp($number = <>);
if ( $number = /[0-9]/) {
print "you number $number\n"
}
./firsh.pl
Enter number: 23
I thought, what print was
"you number 23"
but result was
"you number 1"
How i can return 23, if pattern match.
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/
