On Wed, 5 May 2004, stu meacham wrote: What would be the best way to print out a range of lines from the content with 2 different delimiters? Do I have to make the content a file first and then open a filehandle? Thanx, Stu
I often use something like: my $content = $mech->content(); # make a copy since this operation is descructive while ($content =~ s!(some pattern)!!) { my $line = $1; print $line; } you will only be in the while loop if your pattern match succeeded on that line so you dont have to check inside the loop. gedanken