The first piece of code runs a shell grep and writes the output into a file.
Actually, it doesn't. Partly this is because it doesn't compile due to the missing semi-colon at the end of the first line but even if you fix that you should see that it doesn't shell out at all. You probably meant to use the qx operator instead of qw but that would make no sense because you are using it in void context.
With these mistakes it is hard to know what code you are really running (it certainly can't be what you've posted). This makes it very difficult to provide any insight (as discussed in How do I post a question effectively?). Instead, here's a free tip. Never do this:
$ foo | sort | uniqif you are concerned about optimisation. sort has a -u flag which is much more efficient that firing up a separate uniq to de-duplicate the dataset.
In reply to Re: search/grep perl/*nix
by hippo
in thread search/grep perl/*nix
by Gtforce
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |