Update : Fixed a number of bugs by help of bart.
Update : By blazar's advice, removed the exit 0; at the end. CB questioning revealed it to be unneccessary(sp?). Well, learned something new... guess it's my Pascal habit of ending my scripts.
Update : I think g0n, having quite some experience in building (be it evil) robots, would perhaps be best-suited for building the Linux-running dishwashbot.
According to g0n, this, ummm... wouldn't work. Yes. Any volunteers? ;-)
#!/usr/bin/perl use strict; use warnings; use kitchen qw(kitchenSink); #imports kitchen stuff we need my $sink = new kitchenSink; my @dirties = kitchenSink->get('DIRTIES'); #get all dirty dishes and o +ther utensils if(@dirties) { #there're dirty dishes! my @tub = new $sink->tub; #cleaning tub my @clean = new $sink->dryrack; push(@tub, $sink->liquid_soap); push(@tub, $sink->faucet(water('HOT'))); push(@tub, $sink->brush); while(@dirties) { push(@tub, shift @dirties ); while(dirty($tub[-1])) { clean($tub[-1]) } push(@clean, pop @tub ); #add to dry rack } while(@clean) { put_away($_, getLocation($_)); #returns cleaned item, involves $dr +yingCloth } } print "We're done!\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Cleaning the Monastery dishes
by planetscape (Chancellor) on Oct 03, 2005 at 08:39 UTC | |
|
Re: Cleaning the Monastery dishes
by gargle (Chaplain) on Oct 03, 2005 at 09:34 UTC | |
by jkva (Chaplain) on Oct 03, 2005 at 09:39 UTC | |
|
Re: Cleaning the Monastery dishes
by atcroft (Abbot) on Oct 03, 2005 at 19:04 UTC | |
|
Re: Cleaning the Monastery dishes
by jdporter (Paladin) on Oct 03, 2005 at 19:19 UTC | |
by GrandFather (Saint) on Oct 03, 2005 at 21:38 UTC | |
by jdporter (Paladin) on Oct 03, 2005 at 22:01 UTC | |
by GrandFather (Saint) on Oct 03, 2005 at 22:37 UTC | |
by serf (Chaplain) on Dec 08, 2005 at 11:44 UTC |