Hi there, I am getting the following:
cannot execute ftpscr Illegal seek at ./getfile.pl line 31. from a simple Perl script (below). The system command is returning the error and the pathname points to the current directory. I cannot seem to find any documentation on this error. Has anyont encountered the same. Thanks in advance for any help, Tony #!/usr/local/bin/perl -w use strict; use Cwd; my $hostname = "barney"; my $username = "mimsp"; my $password = "mimsp"; my $sourcedir = "../work"; my $destdir = "../work"; my $file = "MSF099"; my $command = "upload"; my $Basedir = cwd(); my $args; open FTPSCR, "> ftpscr"; print FTPSCR "#!/usr/bin/ksh\n"; print FTPSCR "ftp -n -v $hostname << EOF > ftplog\n"; print FTPSCR "user $username $password\n"; print FTPSCR "bin\n"; print FTPSCR "cd $sourcedir\n"; print FTPSCR "lcd $destdir\n"; print FTPSCR "get $file\n"; print FTPSCR "bye\n"; print FTPSCR "EOF\n"; print "$Basedir\n"; system("chmod +x ftpscr"); $args = "$Basedir/ftpscr"; system("/usr/users/tony/perl/proj1/ftpscr") or die "cannot execute ftpscr $!"; #unlink "ftpscr"; #system($command); ===================================================================== DISCLAIMER 1. The information contained in this E-mail is confidential. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this E-mail. Such unauthorised use may be unlawful. If you have received this E-mail in error, please inform us immediately and delete it and all copies from your system. 2. The views expressed in this E-mail are those of the author, and do not represent the views of AMT-Sybex Group Ltd., its associates or subsidiaries, unless otherwise expressly indicated. In the avoidance of doubt, the insertion of the name of AMT-Sybex Group Ltd., its associate or subsidiary under the name of the sender may constitute an express indication that the views stated in the Mail are those of the named company. ===================================================================== For more information on the AMT Sybex group visit: http://www.amt-sybex.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]