You need to open the output file before you write to it. Move the "open (NEW" line up above the loop that prints to it.
Aaron B.
Available for small or large Perl jobs and *nix system administration; see my home node.
In reply to Re: Perl script to find particular string and save those lines in another file?
by aaron_baugher
in thread Perl script to find particular string and save those lines in another file?
by sumathigokul
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |