ashokbabumannam has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: please solve this
by runrig (Abbot) on Mar 17, 2015 at 18:26 UTC
    Okay, I've solved it. Now what?
      "...Now what?"

      You will be mentioned in dispatches. And perhaps you get a beer for free.

      Best regards, Karl

      «The Crux of the Biscuit is the Apostrophe»

Re: please solve this
by karlgoethebier (Abbot) on Mar 17, 2015 at 18:23 UTC
    "please solve this"

    No. Not for all the money in the world. But please see the FAQ on how to continue...

    Best regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

        Thank you very much for prompting me ;-)

        But you are right. And i must admit that some of your replies to my posts occasionally have a kind of educational effect.

        Best regards, Karl

        «The Crux of the Biscuit is the Apostrophe»

Re: please solve this
by hdb (Monsignor) on Mar 17, 2015 at 19:37 UTC

    I have discovered a truly wonderful proof of this proposition, but the margin is too small to contain it.

      Excellent, Pierre de F...

      Je suis Charlie.
Re: please solve this
by ww (Archbishop) on Mar 17, 2015 at 20:35 UTC

    ... and you may find it easier to solve if you correct the "output" so you have only ONE "GO RIGHT" and add a "GO LEFT".

    But pay special attention to the first few replies: asking us to do your homework is a loser (or even a double loser: not only will you not learn much, but you may get no more useful replies than already posted) for you and a waste of our time.

      No, the output is correct; M is two columns to the right of G and no need for any left motions (assuming the post has not been modified between when you saw it and when I did). It will be important to developing a solution that at least one of the test cases includes movement in each direction.

      Dum Spiro Spero
Re: please solve this
by LanX (Saint) on Mar 17, 2015 at 21:56 UTC
    ashokbabumannam, welcome to the monastery! :)

    I am shocked by the hostility you are experiencing.

    May I ask, what did you try? =)

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)

    PS: Je suis Charlie!

      I'm not and apparently the only thing this being did was try to cheat. In the good old days of Britain it'd receive a few well deserved with a cane. That would do it good.

      Jenda
      Enoch was right!
      Enjoy the last years of Rome.

        ...receive a few well deserved with a cane...

        I needed about one years to realize this.

        «The Crux of the Biscuit is the Apostrophe»

        Sometimes sarcasm is not apparent for newbies. xD

        Cheers Rolf
        (addicted to the Perl Programming Language and ☆☆☆☆ :)

        PS: Je suis Charlie!

Re: please solve this
by Anonymous Monk on Mar 17, 2015 at 23:28 UTC
    Here is a start
    #!/usr/bin/perl -- use strict; use warnings; my @keyboard; $keyboard[0][0] = "E"; ... Instruct( \@keyboard, 'RFGM' ); sub Instruct { my( $keyboard, $input ) = @_; ... }
Re: please solve this
by Anonymous Monk on Mar 22, 2015 at 22:07 UTC

    Here's a different hint

    #!/usr/bin/perl # http://perlmonks.org/?node_id=1120349 use strict; use warnings; my $keyboard = <<end_of_keyboard; ERTYU1 DFGHJ2 CVBNM4 end_of_keyboard my ($oldrow, $oldcol); for my $press ( split //, shift // 'RFGM' ) { $keyboard =~ /(.*)\Q$press/ or next; # find key, ignore if missing my ($row, $col) = ($` =~ tr/\n//, length $1); defined $oldrow and print 'v' x ($row - $oldrow), '^' x ($oldrow - $row), '>' x ($col - $oldcol), '<' x ($oldcol - $col); ($oldrow, $oldcol) = ($row, $col); print $press; } print "\n";