in reply to Re^2: Reassign STDOUT/STDERR contents to a variable
in thread Reassign STDOUT/STDERR contents to a variable
Should work, too, in principle, e.g.
my $stdin = "Some input text here\n"; close STDIN; open(STDIN,'<', \$stdin) or die $!; while (my $line = <STDIN>) { print "got line: $line"; } __END__ got line: Some input text here
What are those 10 pages complaining about? :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Reassign STDOUT/STDERR contents to a variable
by lothos (Novice) on Sep 25, 2009 at 18:38 UTC | |
by almut (Canon) on Sep 25, 2009 at 19:02 UTC | |
by lothos (Novice) on Sep 26, 2009 at 21:11 UTC | |
by Anonymous Monk on Sep 27, 2009 at 02:19 UTC | |
by Anonymous Monk on Sep 27, 2009 at 02:24 UTC | |
by lothos (Novice) on Sep 28, 2009 at 06:06 UTC | |
by ikegami (Patriarch) on Sep 27, 2009 at 03:23 UTC |