in reply to Conditonal insert into Array? (Tie::File)

914,
Change your for loop:
for my $index (0 .. $#threads - 1) { if ($threads[$index] =~ /$parent/) { if ($threads[$index +1] eq '<ul>')

Cheers - L~R

Replies are listed 'Best First'.
Re: Re: Conditonal insert into Array? (Tie::File)
by u914 (Pilgrim) on May 26, 2003 at 18:27 UTC
    Ah! that's so obvious you could've smacked me in the head with "Programming C" and i still wouldn't have gotten it..

    Thanks!

    (this implies that there isn't a way to say "array element after the current one" though, true?)