in reply to Re: copy - Inappropriate ioctl for device
in thread copy - Inappropriate ioctl for device

$! is only modified on failure. Most if not all functions leave it alone on success. This means if the copy succeeds, then $! is set to whatever it was before copy() was called -- which, given the nature of $!, is probably an error result, but might be success, as lakshmananindia noted.

wol's solution is best, because it doesn't rely on $! to figure out whether the copy succeeded.

  • Comment on Re^2: copy - Inappropriate ioctl for device