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";
In reply to Cleaning the Monastery dishes by jkva
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |