when I substitute it with any string it is done but when I am inserting newline as in above code it is giving error. I don't want to do it with sed as I know sed works only in linux. If someone can help me to insert a newline after every four lines using perl and not sed.use strict; use warnings; my @files= @ARGV; for my $input_file (@files) { system "sed -i '0~4 s/\$/\n/g' $input_file"; }
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |