#!/usr/bin/perl use strict; use warnings; my $status = "it's a beautiful day but I am feeling crapy"; # note typo if ( $status =~ /(beautiful|average|tough)/ ) { print "Day: $1\n"; } else { print "No match for day\n"; } if ( $status =~ /(happy|alright|crappy)/ ) { print "Feeling: $1\n"; } else { print "No match for feeling\n"; } __END__