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

...strict and warnings, i am unable to get out of " Inappropriate ioctl for device "...
Your mistake was checking $! when you weren't supposed to.

Do not use $! to determine if a failure occured.

perlvar says the value of $! is meaningful only immediately after a failure:

if (open(FH, $filename)) { # Here $! is meaningless. ... } else { # ONLY here is $! meaningful. ... # Already here $! might be meaningless. } # Since here we might have either success or failure, # here $! is meaningless.