theintern has asked for the wisdom of the Perl Monks concerning the following question:

Within I perl script I am writing I want to submit a batch job and catch any seg faults and print those to an output file. I have tried something like this:

some code here.... system(bsub catchsegv sample.exe sample.dat); code..

it takes catchsegv as the executable and errors cause sample.exe is not an argument, which I can understand, but I don't know how to break it up. The format for bsub is bsub .exe .dat and catchsegv is catchsegv .exe .dat, and I need to use the same exe and same dat file for both, so I tried:

system(bsub catchsegv (sample.exe sample.dat) sample.dat);

and it just errors. I also tried pulling the catchsegv out and making it a function catchsegv_func and tried

system(bsub catchsegv_func sample.dat);

and that also is not working for me. Appreciate any help.

Replies are listed 'Best First'.
Re: Bsub and catchsegv
by ikegami (Patriarch) on Jul 10, 2007 at 17:36 UTC
    system('bsub', 'catchsegv', 'sample.exe', 'sample.dat');