#!/usr/bin/env perl use strict; use warnings; print "Please enter a string to analyze\n"; chomp (my $input = ); while (lc $input ne 'done'){ print "Phone number\n" if $input =~ /(?:1-)?\d{3}-\d{3}-\d{4}/; print "RCS Id\n" if $input =~ /[a-z]{1,6}\d*/; print "Floating point number\n" if $input =~ /\d*\.\d+/; print "Please enter a string to analyze, or 'done' to exit\n"; chomp ($input = ) }