in reply to Verifying number input

In addition to the excellent leads given by footpad above, I might just also throw Regexp::Common written by Damian Conway into the mix. This module provides a number of regular expressions for everyday use - For example, from the documentation POD:

use Regexp::Common; while (<>) { /$RE{num}{real}/ and print q{a number\n}; /$RE{quoted}/ and print q{a ['"`] quoted string\ +n}; /$RE{delimited}{-delim=>'/'}/ and print q{a /.../ sequence\n}; /$RE{balanced}{-parens=>'()'}/ and print q{balanced parentheses\n +}; /$RE{profanity}/ and print q{a #*@%-ing word\n}; }

In addition to this, Regexp::Common allows the specification and matching of {real} and {int} numbers, numbers of differing base and those separated into groups by a specified separator.

Definitely worth a look at ... TheDamian++

 

perl -e 's&&rob@cowsnet.com.au&&&split/[@.]/&&s&.com.&_&&&print'