On Wed, 30 Jul 2014 11:55:46 -0400
ESChamp <esch...@gmail.com> wrote:

> Robert Wohlfarth wrote on 7/30/2014 10:31 AM:
> > On Wed, Jul 30, 2014 at 1:00 AM, ESChamp <esch...@gmail.com
> > <mailto:esch...@gmail.com>> wrote:
> > 
> >     0D 0A 3C 70 72 65 3E 0D 0A
> > 
> >     so no invisible characters.
> > 
> >     > Or maybe <pre> occurs on the first line, in which case $index
> >     > will have the value 0, which is treated as false, and your
> >     > program will die.
> > 
> >     <pre> is line 709. No other line is simply <pre>
> > 
> > 
> > How about the 0D 0A at the end of the line? Unless the script used
> > "chomp", the exact line is "<pre>\r\n".
> 
> Thanks, Robert. I changed the <pre> to <pre>\r\n but it made no
> difference.

Did you also replace the single quotes with double quotes, so that the
\r\n will actually be a carriage return and newline, rather than
literal?

You're probably better off doing it via a regex, or ensuring chomp() is
used, so it'll be portable between platforms with different line
endings.




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