I am running Perl script under cygwin which takes input from <STDIN>
and process the requests continuously.
#!/usr/bin/perl
print "Enter Input:";
while(<STDIN>) {
print "Recieved Input: $_";
print "Enter Input:";
}
$perl testPerl.pl
Enter input:input1
Recieved input:input1
Enter input:inpt2
Recieved input:input2
Enter input:
Now, I would like the up arrow at the current prompt: "Enter input:" to take the previous inputs i.e "input2","input1"
It behaves as expected when running under windows enivronment (cmd.exe)
But the problem under cygwin is that the up arrow literally takes the cursor 1 row up i.e it takes to the line "Recieved input:input2"
Please share your thoughts on this.