the code that i have shown is the exact one that i am trying.. it works perfectly fine when i execute from the command line but when i put in the script it just cats the file and displays the which i am storing in an array.
Comment on Re^2: commands with multiple pipes in perl
the code that i have shown is the exact one that i am trying..
You can't just execute shell code in perl as if perl were the shell. You need something like system. So show us the perl code you've tried. And try the example I wrote.