in reply to Failed to close file
I suspect that the problem is that further up in the code wherever those variables are calculated, there is some humongous result. Try just printing $sanity_code and/or $tests to STDOUT instead of to PACK and see what happens....
#!/usr/bin/perl use strict; use warnings; my $pack = 'test.txt'; #fine when using these vars.... my $sanity_code = "blah"; my $tests = "asdfasdf"; open(PACK,">$pack") or die("failed to open file $pack"); print PACK <<_M_E; #!/usr/intel/bin/tcsh -f $sanity_code $tests _M_E close(PACK) or die("failed to close file $pack");
|
|---|