in reply to Returns from using system function

I'm afraid your testing the wrong variable there. Instead of $!, which is what is used when something goes wrong in perl, you want $? which is the return status of system().
So it seems that the error concerned occured earlier on in your program, which sounds like the result of mishandling your files (it's errno 9 if that's of any help). Then there's also the fact that your system() call is returning a non-zero return code which should probably be of concern.
HTH

broquaint

Replies are listed 'Best First'.
Re: Re: Returns from using system function
by Kalimeister (Acolyte) on Nov 15, 2001 at 23:22 UTC
    Thank you for replying...
    The thing that confused me initially was that system() was returning a non zero number - namely 256 which from reading about system() really means 1 so I thought by checking what the value of $! was that would tell me what errno 1 is. If that is not the case then how do I figure out what errno 1 is? and is it possible for you to tell why that kind of error might be happening?
    Thanks again, Kalimeister
      To figure out what the error numbers are, find and read errno.h on your box. It's in /usr/include/asm/ for me. The Errno module may or may not help you.
        Ok, Thank you for the guidance. Sorry about the basic questions but I am quite new to perl, so... I checked it out and apparantly the errno is EPERM, which unfortunately means absolutely nothing to me. Any more help out there?
        Thank you kindly! Kalimeister