in reply to Re^2: return undef
in thread return undef
I think you are confusing the meaning of copying filehandles with that of copying the contents from one file to another.
I am guessing that it is the latter that you really want. I assume that myfunction returns either an open read handle or undef. In this case, you can do something like
my $in = myfunction(); if ( $in ) { print FILEHANDLE while <$in>; } else { # handle null-handle error; }
the lowliest monk
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: return undef
by dwijew (Initiate) on May 23, 2005 at 03:00 UTC | |
by tlm (Prior) on May 23, 2005 at 03:04 UTC |