in reply to Can anyone tell me what this is doing?

Your code appears to discard everything in $pages[$PG] after the word "end" (on a line by itself.)

Note that this should probably be referring to $pages[$PG], rather than @pages[$PG].


_______________
DamnDirtyApe
Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.
            --Friedrich Nietzsche

Replies are listed 'Best First'.
Re: Re: Can anyone tell me what this is doing?
by agentv (Friar) on Aug 08, 2002 at 19:09 UTC
    ...what's frustrating (to a project lead, a maintenance programmer, or an instructor) is that it would work as published.

    Sometime, programmers go for many months (or longer) thinking that:

    @table[1]

    is the same as:
    $table[1]

    because it works the same most of the time. It's only when something breaks that we start to truly care about the correct way to do things.

    And of course we all know what happens next year. :-)

    ...all the world looks like -well- all the world, when your hammer is perl.
    ---v