Created
March 7, 2015 06:15
-
-
Save LadyAleena/9510521177d2ad6e881d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
# This is a script to show how to set a table for a formal dinner. | |
# The information came from various places on the internet. | |
# It may be inaccurate. | |
my @courses = qw(salad fish entree oyster dessert); | |
if (@courses > 3) { | |
my @last = splice(@courses,3,-1); | |
my @forks = map { "$_ fork" } @courses; | |
my @knives = map { "$_ knife" } reverse @courses; | |
my $last = grep { /oyster/ } @last ? 'oyster fork' : ''; | |
print 'napkin '.join(' ',@forks).' plate '.join(' ',@knives).' spoon '.$last; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment