in reply to push problem

Use strict and warnings; they'll tell you that you're missing the comma after @array (or at least point you in that direction.)

Update: warnings doesn't actually give you a lot of extra info; use diagnostics for a better explanation.


_______________
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: push problem
by jryan (Vicar) on Nov 23, 2002 at 02:07 UTC
    It has nothing to do with strict and warnings; it is a syntax error, it won't even compile.

      Without warnings:

      Type of arg 1 to push must be array (not array slice) at test.pl line +4, near "];" Execution of test.pl aborted due to compilation errors.

      With warnings:

      Useless use of push with no values at test.pl line 4. Type of arg 1 to push must be array (not array slice) at test.pl line +4, near "];" Execution of test.pl aborted due to compilation errors.

      Not a ton of new information, but if you can't figure out what's wrong from the first error message, it might be of some help.


      _______________
      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