in reply to breaking up a file by delimiter
#!/usr/bin/perl # https://perlmonks.org/?node_id=1223630 use strict; use warnings; use Data::Dumper; $Data::Dumper::Indent = 0; local $/ = "\nXXX\n"; s/\nXXX\n\z//, tr/\n/ / for my @data = <DATA>; print Dumper \@data; __DATA__ This is a test. XXX This is a multiline test. XXX
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: breaking up a file by delimiter
by navalned (Beadle) on Oct 07, 2018 at 13:48 UTC | |
by Laurent_R (Canon) on Oct 07, 2018 at 21:46 UTC | |
by tybalt89 (Monsignor) on Oct 08, 2018 at 00:05 UTC | |
by Laurent_R (Canon) on Oct 08, 2018 at 17:39 UTC |