in reply to search/grep perl/*nix
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: search/grep perl/*nix
by Gtforce (Sexton) on Nov 25, 2017 at 17:25 UTC | |
by kcott (Archbishop) on Nov 26, 2017 at 00:24 UTC |