in reply to Match number >= 0 and <1
It could be more concise, and you don't need the alternation:
Interpreted as: zero or one zeroes, a period, followed by digits.my ($num) = $_num =~ /^0?\.\d+$/;
pbeckingham - typist, perishable vertebrate.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Match number >= 0 and <1
by ikegami (Patriarch) on Jul 29, 2005 at 14:58 UTC |
In Section
Seekers of Perl Wisdom