print FILE ' [[ -f "$FILE" ]] && grep ... && break\n';
This gives you a literal \n (backslash-n) at the end | embedded in the output file. See this for a better (IMHO) approach.
Give a man a fish: <%-{-{-{-<
In reply to Re^2: creating Shell Script using Perl
by AnomalousMonk
in thread creating Shell Script using Perl
by pratikmonu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |