I am using Ubuntu 22 and perl.
I want to print a string to the screen and then be able to edit it on the screen and when I press ‘enter’ have the edited text saved to a new variable name. The closest I’ve come to it is printing the string and using r. I can then enter new text but it ignores the printed text.
$jack = “how now brown cow”;
I want to print this to the screen and then edit it so it comes out…
$jill = “how about now brow horse”.
If I print this with r and then enter “something” then $jack = “something”.
If I print the line and end with double-quotes I can’t access the text.
I’m stuck.
I tried using r to terminate the printed line. This brings the cursor back to the beginning of the line but ignores the printed text. I tried ending the printed line with a double-quote but I can’t backspace or access the printed text no matter what I tried