in reply to Re^2: Problem with Windows Console input
in thread Problem with Windows Console input
But yes there should be a way to re open the stdin handle.
There is:
#! perl -slw use strict; close STDIN; readline(STDIN); open *STDIN, '<', 'CON:' or die $!; my $x = readline(STDIN); print "Got: $x from reopened STDIN"; __END__ C:\test>junk84.pl readline() on closed filehandle STDIN at C:\test\junk84.pl line 6. fred Got: fred from reopened STDIN
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Problem with Windows Console input
by Athanasius (Archbishop) on Feb 24, 2014 at 09:05 UTC | |
by BrowserUk (Patriarch) on Feb 24, 2014 at 16:49 UTC | |
by Athanasius (Archbishop) on Feb 25, 2014 at 03:56 UTC | |
by Anonymous Monk on Feb 24, 2014 at 11:47 UTC | |
|
Re^4: Problem with Windows Console input
by Anonymous Monk on Feb 27, 2014 at 11:31 UTC | |
by BrowserUk (Patriarch) on Feb 27, 2014 at 11:43 UTC |