my $separator = qr/(.*)<<<(.*)>>>(.*)/; # ... if (my ($before, $name, $after) = /$separator/) { print $out $before if defined $before; close $out; open $out, '>', 'fixed_square' . $name . '.txt' or die "Unable to +write to fixed_square$name.txt: $!\n"; print $out $after if defined $after; }
In reply to Re: Splitting a Text File
by choroba
in thread Splitting a Text File
by LivinTheDream126
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |