If I assign variable $x=11 it still show me that I have correct match. Any kind of help I will realy appreciate. Vana#!/usr/bin/perl #$x=11; #$x=0; $x=2; #pattern for range from 1 to 10; if ($x=~ m/[1-9]|10/) { print "Correct match"; } else { print "incorrect"; }
Edit kudra, 2002-06-08 Changed title
In reply to regular expression to match numbers by Vanesa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |