in reply to The bug in DBI package
after a dbi subroutine call any system call as example given above returning the message "no child process for $? & $! conatins "-1" as status.
So? It makes no sense to check $! unconditionally. As documented, $! is meaningless except after a system call that resulted in an error. You haven't been told there was an error by a system call. You haven't even made any system calls.
As for $?, if you want gzip's status, you should save $?'s value closer to the backticks.
Sorry, but $! and $? changing is not a bug.
By the way, I'm confused by your use of references to pass simple strings. It's making the code needlessly complex and error-prone. To add to the confusion, you use the same var names for the references as the actual vars!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: The bug in DBI package
by elf_firein (Acolyte) on Apr 15, 2009 at 06:26 UTC | |
by ikegami (Patriarch) on Apr 15, 2009 at 06:38 UTC | |
by elf_firein (Acolyte) on Apr 15, 2009 at 07:04 UTC |