What I get is this (I'v formatted it a bit to make it a little more readable.)undef $^E; undef $!; undef $?; print "using system \n"; system("net use v: \\\\SERVERNAME\\SHARENAME"); print "dollar caret E reports $^E \n"; print "dollar Exclamation mark reports $! \n"; print "dollar question mark reports $? \n"; print "using backticks \n"; `net use v: \\\\SERVERNAME\\SHARENAME`; print "dollar caret E reports $^E \n"; print "dollar Exclamation mark reports $! \n"; print "dollar question mark reports $? \n";
What I really want is the english readable message eg System error 85 has occurred.The local device name is already in use. I think this is coded somehow in $? but my brain hurts and I can't figure it out. Has anyone any hints, tricks or a suggestion of where I should be looking for the answer?using system System error 85 has occurred. The local device name is already in use. dollar caret E reports The system cannot find the file specif +ied dollar Exclamation mark reports dollar question mark reports 512 using backticks System error 85 has occurred. The local device name is already in use. dollar caret E reports The pipe has been ended dollar Exclamation mark reports dollar question mark reports 512
In reply to capturing error messages from backticks or system by Piercer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |