in reply to How to dup $FOO to STDIN
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)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: How to dup $FOO to STDIN
by belg4mit (Prior) on Nov 15, 2001 at 20:30 UTC | |
by jeroenes (Priest) on Nov 15, 2001 at 20:39 UTC |