I am trying to add a line to many perl files at line 4 using perl liner. I am using :
perl -pi -le 'print " cell_type = pad;" if $. ==4' *.cell.plt
But this is only changing the first file in my directory, not all of them. How do I insert the line in all files at once. I tried several ways but it always fails. Please help. Thanks.