in reply to vanishing system call
Another possibility: did you chdir somewhere else in your script? $file may not be in the current directory, in that case.
You're also needlessly using cat. It probably doesn't matter, but why not just do this:
Also, make sure sort is on the path when the script runs; if it runs from a crontab or webserver, it might not be.system("sort -t\\| +1 -2 -o $file.out $file");
It's probably safer to do:
You might have to change the /usr/bin if that's not where your sort binary is.system("/usr/bin/sort -t\\| +1 -2 -o $file.out $file");
|
---|