SPUG: Splice
Yitzchak Scott-Thoennes
sthoenna at efn.org
Thu Nov 4 11:27:37 CST 2004
On Thu, Nov 04, 2004 at 09:01:19AM -0800, Dan Ebert <mathin at mathin.com> wrote:
>
> OK, this is an easy one. I just need a sanity check.
>
> splice(@array,0);
>
> does the same thing as
>
> @array = ();
>
> right?
Almost:
$ perl -wle'@array=1..3;print splice(@array,0); print "after:@array"'
123
after:
sthoenna at DHX98431 ~
$ perl -wle'@array=1..3;print(@array=()); print "after:@array"'
after:
More information about the spug-list
mailing list