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

Good Evening Esteemed Monks.
My question is fairly simply. I would like to move the cursor back to edit each entry. Please point me in the right direction. I've posted my simple code below to build upon. Thanks in advance!

#!/usr/bin/perl open (FILE, 'data.txt'); while (<FILE>) { chomp; ($name, $email, $phone) = split("\t"); print "Name: $name\n"; print "Email: $email\n"; print "Phone: $phone\n"; print "---------\n"; } close (FILE); exit; __END__ Tom tom@example.com 111-1111 Dave dave@example.com 222-2222 Test test@example.com 333-3333

The output is shown below:
Name: Tom
Email: Tom@example.com
Phone: 111-1111
---------
Name: Dave
Email: dave@example.com
Phone: 222-2222
---------
Name: Test
Email: test@example.com
Phone: 333-3333
---------

Replies are listed 'Best First'.
Re: Tab Cursor Backspace
by LanX (Saint) on Apr 29, 2014 at 23:26 UTC
    > My question is fairly simply.

    Well I can only speculate what the real question is and after 82 posts already I'd expect you to know how to ask a question. :)

    There are control characters to move the cursor in a console... is that really what you want???

    If yes, did you google for it?

    Cheers Rolf

    ( addicted to the Perl Programming Language)

      Hello Rolf
      How I currently edit selections is I take a "key" which in this case would be a first and last name combo which searches the file and prints the listing. Which brings me to a menu I've created asking which part of the entry I want to edit either email, phone number, etc. Depending on which selection is made it asks for the old email, press enter, then asks for new email, press enter and the entry is shown with the updated data. This approach has been working flawlessly however to make it easier and using less menus etc...I would like to make this happen in one screen not several which brings me to cursor control which is a realm I have not entered into. Thanks for the help.

        I heard good things about Curses::UI considering pure text user interfaces.

        HTH!

        Cheers Rolf

        ( addicted to the Perl Programming Language)