Skip to content

Instantly share code, notes, and snippets.

@LadyAleena
Created March 7, 2015 06:13
Show Gist options
  • Save LadyAleena/77fdc8344f5b2d01dbf3 to your computer and use it in GitHub Desktop.
Save LadyAleena/77fdc8344f5b2d01dbf3 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings FATAL => qw( all );
# This script describes my laundry day.
# It is inaccurate currently.
# I can't get a load washing while the previous is drying.
local $\ = "\n";
my @laundry_loads = ('cottons', 'cold water items', 'bed clothes', 'uniforms', 'clothing of the day');
my @laundry_tasks = ('wash', 'dry', 'fold');
for my $load (@laundry_loads) {
for my $task (@laundry_tasks) {
my $load_task = "$task $load";
print "$load_task";
if ($task eq 'fold') {
if ($load =~ /bed clothes|uniforms|clothing of the day/) {
my $new_load = $load eq 'bed clothes' ? 'laundry' : $load ;
print "put away $new_load";
}
if ($load eq 'bed clothes') {
print 'vacuum the house';
print 'make the bed';
}
if ($load eq 'uniforms') {
print 'take showers';
}
}
}
print "" if $load ne 'clothing of the day';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment