in reply to Net::Domain module works only as root

You are missing the $ sigil on $rc... Not that that is your problem.

You are not running the script with sufficient permissions. 13 is the return error code from the system call. Error number 13 is "Permission denied". (Under linux)

Update: Sigh, I am indeed wrong as ikegami points out below. Error number 13 is "Permission denied" under Windows. That being said, maybe the missing sigil IS your problem... writing to an undefined handle perhaps?

  • Comment on Re: Net::Domain module works only as root

Replies are listed 'Best First'.
Re^2: Net::Domain module works only as root
by ikegami (Patriarch) on Jan 09, 2010 at 18:45 UTC

    Update: Sigh, I am indeed wrong as ikegami points out below. Error number 13 is "Permission denied" under Windows.

    That's not what I said. I said system returning 13 means the child died from SIGPIPE. It does not mean Permission denied on any OS.

    Now, if system returned -1, then you'd check $!, and if $! then contained 13, that would mean that system failed because of a permission error (on Windows and linux). But system did not return -1, which means the child was executed successfully. Neither system nor ls reported a permission errors.