if (($? >> 8)==0) {
$valgrind_tool="--tool=memcheck ";
}
- open(C, "<", $CURL);
+ open(C, "<$CURL");
my $l = <C>;
if($l =~ /^\#\!/) {
# The first line starts with "#!" which implies a shell-script.
# Ugly hack but ssh doesn't support pid files
if ($fake) {
logmsg "$pidfile faked with pid=$child\n" if($verbose);
- open(OUT, ">", $pidfile);
+ open(OUT, ">$pidfile");
print OUT $child;
close(OUT);
# could/should do a while connect fails sleep a bit and loop
my $count=12;
while($count--) {
if(-f $pidfile) {
- open(PID, "<", $pidfile);
+ open(PID, "<$pidfile");
$pid2 = 0 + <PID>;
close(PID);
if($pid2 && kill(0, $pid2)) {
}
}
}
- open(FILE, "<", "log/verifiedserver");
+ open(FILE, "<log/verifiedserver");
my @file=<FILE>;
close(FILE);
$data=$file[0]; # first line
sub verifyssh {
my ($proto, $ip, $port) = @_;
- open(FILE, "<" . $SSHPIDFILE);
+ open(FILE, "<$SSHPIDFILE");
my $pid=0+<FILE>;
close(FILE);
return $pid;
sub verifysocks {
my ($proto, $ip, $port) = @_;
- open(FILE, "<" . $SOCKSPIDFILE);
+ open(FILE, "<$SOCKSPIDFILE");
my $pid=0+<FILE>;
close(FILE);
return $pid;
my $filter=$_[1];
my $ofile=$_[2];
- open(IN, "<", $infile)
+ open(IN, "<$infile")
|| return 1;
- open(OUT, ">", $ofile)
+ open(OUT, ">$ofile")
|| return 1;
# logmsg "FILTER: off $filter from $infile to $ofile\n";
$versretval = system($versioncmd);
$versnoexec = $!;
- open(VERSOUT, "<", $curlverout);
+ open(VERSOUT, "<$curlverout");
@version = <VERSOUT>;
close(VERSOUT);
}
if(-r "../lib/config.h") {
- open(CONF, "<", "../lib/config.h");
+ open(CONF, "<../lib/config.h");
while(<CONF>) {
if($_ =~ /^\#define HAVE_GETRLIMIT/) {
$has_getrlimit = 1;
my $fileContent = join('', @inputfile);
subVariables \$fileContent;
# logmsg "DEBUG: writing file " . $filename . "\n";
- open(OUTFILE, ">", $filename);
+ open(OUTFILE, ">$filename");
binmode OUTFILE; # for crapage systems, use binary
print OUTFILE $fileContent;
close(OUTFILE);
}
if($gdbthis) {
- open(GDBCMD, ">", "log/gdbcmd");
+ open(GDBCMD, ">log/gdbcmd");
print GDBCMD "set args $cmdargs\n";
print GDBCMD "show args\n";
close(GDBCMD);
logmsg "core dumped\n";
if(0 && $gdb) {
logmsg "running gdb for post-mortem analysis:\n";
- open(GDBCMD, ">", "log/gdbcmd2");
+ open(GDBCMD, ">log/gdbcmd2");
print GDBCMD "bt\n";
close(GDBCMD);
system("$gdb --directory libtest -x log/gdbcmd2 -batch $DBGCURL core ");
}
# open the executable curl and read the first 4 bytes of it
-open(CHECK, "<", $CURL);
+open(CHECK, "<$CURL");
my $c;
sysread CHECK, $c, 4;
close(CHECK);
my @cmds = grep { /^test([0-9]+)$/ && -f "$TESTDIR/$_" } readdir(DIR);
closedir(DIR);
- open(D, "$TESTDIR/DISABLED");
+ open(D, "<$TESTDIR/DISABLED");
while(<D>) {
if(/^ *\#/) {
# allow comments
#######################################################################
# Start the command line log
#
-open(CMDLOG, ">", $CURLLOG) ||
+open(CMDLOG, ">$CURLLOG") ||
logmsg "can't log command lines to $CURLLOG\n";
#######################################################################