Front page | perl.beginners |
Postings from December 2002
Editing text on the CLI
From:
Pete Emerson
Date:
December 4, 2002 05:48
Subject:
Editing text on the CLI
Message ID:
1039009700.23996.2.camel@emerson.wss.yale.edu
Suppose I have the following program:
0 #!/usr/bin/perl -w
1 use strict;
2 my $var='Edit this';
3 print "Edit \$var here --> ";
4 print $var;
5 $var=<STDIN>; chomp $var;
6 print "\$var has a new value: $var\n";
Can I insert a line in between line 3 and 4 which will make line for
editable? i.e. right now, line 4 prints out "Edit this", but I can't use
the cursor to delete or modify "Edit this". Is there a way to toggle
this behavior on and off?
Pete
-
Editing text on the CLI
by Pete Emerson