That gives warnings and extra <br>s when there aren't five lines yet.
>perl -we"@lines = qw( a b c ); print join '<br>', @lines[0..4]; Use of uninitialized value in join or string at -e line 1. Use of uninitialized value in join or string at -e line 1. a<br>b<br>c<br><br>
Also, given $html_doc = "a new set - line 1 {br} $html_doc", you're short a br when there are five lines.
In reply to Re^2: truncating a text file
by ikegami
in thread truncating a text file
by dankichi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |