T
Tony
Hi,
Whenever I run the system command in perl and try to make sure it runs
sucessfully otherwise do something else, even for the most basic
system commands, I get "Inappropriate ioctl for device"
For example, the code:
$testdate = system("date") or die "can't run /usr/bin/date: $!";
print "$testdate";
returns:
Mon Sep 13 17:01:38 UTC 2004
can't run /usr/bin/date: Inappropriate ioctl for device at test.pl
line 7, <STDIN> line 4.
So it runs the command successfully, but dies anyway. Yes I know
there's another way to do date, this is just an example of the problem
I have. I need to use the system() command for other things, but no
matter what command I do I get the above. I have tried
$varname=system(command) and then testing $varname, but that doesn't
return anything.
Can anyone help? I don't want to use another module, I'm sure I must
be missing something here. Thanks in advance!
operating system is fedora linux, perl version is v5.8.3.
Tony
Whenever I run the system command in perl and try to make sure it runs
sucessfully otherwise do something else, even for the most basic
system commands, I get "Inappropriate ioctl for device"
For example, the code:
$testdate = system("date") or die "can't run /usr/bin/date: $!";
print "$testdate";
returns:
Mon Sep 13 17:01:38 UTC 2004
can't run /usr/bin/date: Inappropriate ioctl for device at test.pl
line 7, <STDIN> line 4.
So it runs the command successfully, but dies anyway. Yes I know
there's another way to do date, this is just an example of the problem
I have. I need to use the system() command for other things, but no
matter what command I do I get the above. I have tried
$varname=system(command) and then testing $varname, but that doesn't
return anything.
Can anyone help? I don't want to use another module, I'm sure I must
be missing something here. Thanks in advance!
operating system is fedora linux, perl version is v5.8.3.
Tony