in reply to Bad File Descriptor Error
The error variable $! is only valid immediately after an actual system error, which must be recognized by other means. If $! is nonzero that doesn't indicate an error in the preceding code. The value can come from anywhere. So you are using it wrong in your code below.
Moreover, why do you run the critical statements under eval()? It will only mask some errors. If the eval() is there for a reason, you ought to inspect $@, not $! after eval finishes to detect possible errors. ($@ is unlike $! in that respect, if it's set after an eval(), there was an error.)
I believe your program is running just fine, the message in $! is irrelevant. Wy you can't copy the file using print() I don't know.
Anno
PS: The behavior of $! is as described in Unix systems. I don't know for sure about Windows.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Bad File Descriptor Error
by digger (Friar) on Mar 20, 2007 at 13:18 UTC | |
by Anno (Deacon) on Mar 20, 2007 at 14:58 UTC | |
by Bro. Doug (Monk) on Mar 20, 2007 at 18:26 UTC |