@foobar = splice(@foobar,@foobar)
Yes, it is both unusual and pointless. In my many years of Perl programming I have never seen anyone do that.
If you want to use splice to empty an array then:
splice @foobar
Would suffice to do the job.
In reply to Re: Unusual (and pointless?) idiom in old code
by jwkrahn
in thread Unusual (and pointless?) idiom in old code
by ajmalton
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |