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? ;-)

As seen in Level 26: Saint, there is a growing problem
in the Monastery since no one dares to clean the dishes
because of Mr. Bones.

I wrote a little script to automate it. Now if a tech-monk
could perhaps build the robot to do it?

This is not meant to run, there might be mistakes in it, I'm only a novice to Perl. Have fun.

-- Detonite
#!/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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.