Just a simple and dirty example of what I think you are asking for. I used an iterator for giving unique filenames. You may have other requirements. :-)#Include the newline in the delimiter... $delimiter = "================================\n"; local($/) = $delimiter; my $cnt=1; while(<INPUT>){ my $outfile = "> output_file_" . $cnt; open(OUT,$outfile)||die"Cannot open $outfile\n$!\n"; print OUT; close(OUT); $cnt++; }
In reply to Re: Range Operator Mysteries
by mrmick
in thread Range Operator Mysteries
by PerlGrok
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |