Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Perl: When DWIM Doesn't. Parent comment
However you can take your original full example of this:
open (my $fh, "<", $config->{file_path}) or die "can't open $config->{file_path}: $!"; my $data; { local $/ = undef; $data = <$fh>; }
use Path::Class 'file'; my $data = file( $config->{file_path} )->slurp
NB. One good habit I currently do have is using Path::Class more ubiquitously :)
There are no comments on this comment yet.
However you can take your original full example of this:
And turn it into just this with Path::Class When dealing with lots of files/directories especially across different platforms I find Path::Class a god send.NB. One good habit I currently do have is using Path::Class more ubiquitously :)