in reply to Pattern Matching Exercises
# chooses a message to print based on the day of the week entered. while ( <> ) { if ( /Saturday|Sunday/i ) { print "Weekend!\n"; } elsif ( /Monday|Tuesday|Wednesday|Thursday|Friday/i ) { print "This is a workday.\n"; } }
|
|---|