N/A [1]
N/A
Wednesday, August 29, 2018 10:52 AM - Geert De Paep
I use Activestate Perl 5.24.1
When running this simple program in a LOCAL SHELL in XShell6 (i.e. like a dos prompt) I have a problem:
print "Commits since last build:\n";
print "xxxx\n";
my $t = sysread STDIN,$c,1;
print "You input $c with $t";
The program immediately asks for input without printing the first 2 lines in the output. After entering the input (and pressing return) the messages "Commits since last build" and "xxxx" are displayed.
So it behaves like line 3 and 4 are executed before line 1 and 2.
XSHELL> perl effe.pl
d
Commits since last build:
xxxx
You input d with 1
In a normal Windows DOS prompt, it is ok:
DOS> perl effe.pl
Commits since last build:
xxxx
d
You input d with 1
I tried already various Terminal settings, but I can't get it to work correctly:
Program Ver. : Xshell 6
When running this simple program in a LOCAL SHELL in XShell6 (i.e. like a dos prompt) I have a problem:
print "Commits since last build:\n";
print "xxxx\n";
my $t = sysread STDIN,$c,1;
print "You input $c with $t";
The program immediately asks for input without printing the first 2 lines in the output. After entering the input (and pressing return) the messages "Commits since last build" and "xxxx" are displayed.
So it behaves like line 3 and 4 are executed before line 1 and 2.
XSHELL> perl effe.pl
d
Commits since last build:
xxxx
You input d with 1
In a normal Windows DOS prompt, it is ok:
DOS> perl effe.pl
Commits since last build:
xxxx
d
You input d with 1
I tried already various Terminal settings, but I can't get it to work correctly:
Program Ver. : Xshell 6
Previous views: 256