Looking at the Perl part of the question:
open( FILE "link86 ^& < $tempfn|" ) || die "Could not run link86: $!\n";
This is a syntax error. FILE
is a bareword filehandle. You need a comma after that for the next argument to open. So, the line should be:
open( FILE, "link86 ^& < $tempfn|" ) || die "Could not run link86: $!\n";
The second argument is a command for the shell to execute. The trailing pipe indicates that the output of the command will be piped to your program via the FILE
filehandle.
^&
will be interpreted by the shell executing this program. In this case, I am assuming the shell is cmd.exe
. ^
is the escape character in cmd.exe
. Therefore, it causes the following &
to be interpreted as a literal character. (See also, Everyone quotes command line arguments the wrong way: “When cmd transforms a command line and sees a ^
, it ignores the ^
character itself and copies the next character to the new command line literally …”)
I am not exactly sure what it does, but it seems to basically execute link86
using the contents of whatever filename is in $tempfn
.
while( <LINK> )
{
print; # what does the print without parameters do?
if( /^(EXCEPTION|ERROR)/i )
{
$abflag = 1;
}
print $dlogH "\nabort Flag: $abflag\n";
}
This reads from the LINK
bareword filehandle. Each line is stored in $_
, and then printed. Without arguments, print
prints the contents of $_
to the currently selected output filehandle (most likely STDOUT
).
If the line contains either EXCEPTION
or ERROR
, it sets the abort flag. For each line read from LINK
, it prints the value of abort flag. Once set, the abort flag remains set.
3
solved C# process parameter invalid while running link86.exe