On 24 Oct 2007 18:35:15 -0000, leo shen <[EMAIL PROTECTED]> wrote: > Hi, I ran into "Inappropriate ioctl for device" when running the > following two lines: > > my $file=shift @ARGV || File::Spec->catfile(q(.),q(a.res)); > open (INPUT,'<', $file) or die " can't open $file : $!";
Which line was it? The first should run without any system interaction, so I presume that the error came from the open(). So the actual message was something like "can't open ./a.res : Inappropriate ioctl for device", right? > I basic want to open a file on the local drive, the file can be write > read and execute. Is it an ordinary file, and not a directory, pipe, socket, or something else special? Do you have read permission on the current directory? Could your filesystem have a defect that needs fixing (by running fsck)? Check to see whether your open(2) manpage gives any reason that you might get that error on your system. Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/