On 07/27/2018 02:37 PM, Rick T wrote:
I tried to implement some advice about slurping that I read on this
mailing list (using local) but cannot get it to work. I get the
message “Value of <HANDLE> construct can be "0"; test with defined()
at line 23” (the $slurp = <$fh1> line). I’m using perl version 5.18.2
installed in 2014.
I’ve googled this error and think (ha!) I understand it, but though
I’ve tried many changes, I cannot make the error go away. I need the
advice of folks who are way ahead of me!
Rick Triplett
use File::Slurp ; #from cpan
my $text = read_file( $file_to_convert ) ;
$text =~ s/\r/\n/g;
$text =~ s/\x0b/<br>/g ;
no need for xms if you aren't using those features.
uri