in reply to Splitting a Text File
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; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Splitting a Text File
by LivinTheDream126 (Initiate) on Jul 26, 2013 at 16:46 UTC |