in reply to vanishing system call
The first thing I would add, and leave in place is
system(" cat $file | sort -t\\| +1 -2 > $file.out ") or warn "sort fai +led $!\n";
Also, you said that "I tried -w". Is there some reason that you don't leave -w on all the time?
The second thing I notice, though my memory of *nix is sketchy is that you are starting 2 processes and using a pipe when 1 process, no pipe would be fine.
system("sort -t\\| +1 -2 <$file > $file.out ") or warn "sort failed $! +\n";
Actually I am fairly sure that you don't even need the '<' infront of the filename but my memory ain't what it once was.
Some other possibilities
What happens if you issue the sort command as you have it immediately after the program has run? If it works as expected then, that will eliminate several possiblities.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: vanishing system call
by sauoq (Abbot) on Sep 20, 2002 at 20:19 UTC | |
by Aristotle (Chancellor) on Sep 21, 2002 at 09:48 UTC |