split treats its second argument as a string (i.e. a scalar), so you need something like this:
my @differenthtml = split /htmlpagemark/, join('', @lines);
Two additional points (with apologies if they’re unnecessary):
The first element of an array is at index 0, not 1 as suggested by the print statements.
Always — yes, always! — begin your script with:
use strict; use warnings;
Hope that helps,
Athanasius <°(((>< contra mundum
In reply to Re: Parsing issues
by Athanasius
in thread Parsing issues
by robertw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |