in reply to Re: Parameters, subs and the shift function
in thread Parameters, subs and the shift function

Abagail-II, what is the signifigance of the + in the shift statements? Why is this a good thing to do?
my @array1 = @{+shift}; my @array2 = @{+shift};
Thanks,
Tim

Replies are listed 'Best First'.
Re: Parameters, subs and the shift function
by Abigail-II (Bishop) on Aug 19, 2003 at 14:55 UTC
    Run it under strict, and try it without the +. The error message you get will enlighten you.

    Abigail

      Ahh, thank you. I'm a little embarrassed. I never dereferenced a builtin like shift only user defined functions.
      Global symbol "@shift" requires explicit package name at noname5.pl li +ne 5. Global symbol "@shift" requires explicit package name at noname5.pl li +ne 6. Execution of noname5.pl aborted due to compilation errors.