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
    Hi, I have updated the posted message.in my actual code I have tested the $! & $? exactly after the backtricks call. You can check the post now.It is corrected exactly as per my original code.
        Actually I did mistake when I posted message.Your diagnosis is right according to previous post. Now updated post is exact replica of my code.Now you can check my updated post to start anlysis. In my orginal code I checked $? & $! just after backtricks as per the updated in the post.