You should not use caps for variable names, only for fileglobs. All caps names may cause conflicts with later versions of perl. Moreover, it is confusing, and maybe causing you to do the wrong thing.
Solutions:
Not really neat, even confusing maybe, but should work.open FOO, "<filename" or die ...; *STDIN = *FOO;
my $fileno = fileno( $foo ); open STDIN, ">&$fileno" or die "Could not open $fileno: $!";
HTH,
Jeroen
"We are not alone"(FZ)
In reply to Re: How to dup $FOO to STDIN
by jeroenes
in thread How to dup $FOO to STDIN
by belg4mit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |