in reply to vanishing system call

You have received a lot of answers to this, but as far as I can see, no one has given you the correct way to check the error from your system call. If someone has, I apologise.

system returns 0 if there are no errors, the opposite of most other operations.

$? contains the error for daughter processes

. Anyway, here is one way:

system(" cat $file | sort -t\\| +1 -2 > $file.out ") == 0 or die "Erro +r:$?\n";
However, that being said, my preference would be to use Perl's sort for this.

-- Regards,
Helgi Briem helgi AT decode DOT is

Replies are listed 'Best First'.
Re^2: vanishing system call
by Aristotle (Chancellor) on Sep 23, 2002 at 17:32 UTC