I am writing a perl script and have hit a roadblock on my way. I am relatively new to perl. i have a command which is a combination of many commands joined by pipes. it basically looks for a particular id in a huge file. when i run the command on the command line it works perfectly fine but when i put it in the script, it cats the whole file instead of just the id that i need. I have used backtics, exec, system... nothing seems to work. Any help will be greately appriciated. i am just not able to over come this.
just to have a clear idea here s the code snippet:
grep 'DataDictionary' $file | awk -F'<pciOFACViolation>' '{print $1}' | awk '{print $3}' | awk -F'>' '{print $1}'..... $file is the file to be searched.