in reply to <digits match>
End the match pattern with the number you are seeking, such as
print "3-digits ending in 5" if ( $number =~ m/\d{2}5$/ ); print "4-digit number ending in 0 or 9" if ( $number =~ m/\d{3}[09]$/ ); # as opposed to print "2 digits followed by a 3, but may have additional digits" if ( $number =~ m/\d{2}3/ );
Hope that helps.
|
|---|