use Regexp::Common qw /URI/; while () { /$RE{URI}{tel}/ and print "$_ contains a telephone URI.\n"; } __DATA__ 555-5555 555-555-5555 (555) 555-5555