in reply to Re^2: Extracting selected fields form file record (updated)
in thread Extracting selected fields form file record
Noone even mentioned File::Slurp! :)
If you must use a module for this, may I suggest Path::Tiny or File::Slurper? See File::Slurp is broken and wrong by Leon Timmermans for why.
Update:
Agree with haukex below to just do it idiomatically without a module: my $string = do { local $/; <$fh> }
See also: Any downsides to this slurp idiom? by haukex (2018 - prior discussion of this problem)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Extracting selected fields form file record
by haukex (Archbishop) on Feb 08, 2022 at 12:25 UTC | |
by choroba (Cardinal) on Feb 08, 2022 at 13:07 UTC |
In Section
Seekers of Perl Wisdom