in reply to Re^2: Runing "regular" code with threaded perl
in thread Runing "regular" code with threaded perl

I do not "use threads" in my code. Whether it makes sense or not (it certainly doesn't to me), the fact is that this works:

system("xspec - ${tmp}.xcm");

open(DAT, "${tmp}xsfit.dat") || die ("Could not open file!");

whereas this does not:

bjmsys("xspec - ${tmp}.xcm", $v);

open(DAT, "${tmp}xsfit.dat") || die ("Could not open file!");

where------------

sub bjmsys {

my $arg=shift;

my $v=shift;

$v=0 unless defined $v;

my $status;

print "$arg\n" if $v>1||$v<0;

$status=system("$arg");

print "return status = $status\n" if $v>1;

return $status;

}
  • Comment on Re^3: Runing "regular" code with threaded perl

Replies are listed 'Best First'.
Re^4: Runing "regular" code with threaded perl
by massa (Hermit) on Jul 10, 2008 at 10:24 UTC
    Curious. What do you mean with "it doesn't work"? Does it die with "Could not open file"?
    []s, HTH, Massa