I am trying to use a shell grep command inside a perl script using system command as below.
I am trying to grep for lines that ends with 1 inside the system command. system command concatenates everything and writing into output file and grep ' $1' does not work. I tried with double quotes too but throwing error. Anything wrong with the syntax?
Code:
system "cat $source_path/s_${i}_${j}_0*testing.txt | grep ' $1' | head > $path/s_${i}_${j}.txt";
Comment