- or download this
my $data = do { local $/; <DATA> };
@array = split 'on something', $data;
- or download this
while ( my $line = <DATA> ) {
# handle the line here instead of as an element of an array
}
- or download this
use Path::Tiny 'path';
my $file_path = '/foo/bar/baz.txt';
...
chomp $line;
...
}