Hi all!

On Fri, 27 Jul 2018 14:42:35 -0400
Uri Guttman <u...@stemsystems.com> wrote:

> 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
> 

Please see
http://blogs.perl.org/users/leon_timmermans/2015/08/fileslurp-is-broken-and-wrong.html
and
https://www.reddit.com/r/perl/comments/3hfsqt/fileslurp_is_broken_and_wrong/
for better alternatives to File::Slurp .



> 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
> 
> 
> 



-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
My Aphorisms - http://www.shlomifish.org/humour.html

Don't worry over what other people are thinking about you.  They're too
busy worrying over what you are thinking about them.
    — Unknown Source

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to