1*0Sstevel@tonic-gate#!./perl 2*0Sstevel@tonic-gate 3*0Sstevel@tonic-gate# $RCSfile: unshift.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:35 $ 4*0Sstevel@tonic-gate 5*0Sstevel@tonic-gateprint "1..2\n"; 6*0Sstevel@tonic-gate 7*0Sstevel@tonic-gate@a = (1,2,3); 8*0Sstevel@tonic-gate$cnt1 = unshift(a,0); 9*0Sstevel@tonic-gate 10*0Sstevel@tonic-gateif (join(' ',@a) eq '0 1 2 3') {print "ok 1\n";} else {print "not ok 1\n";} 11*0Sstevel@tonic-gate$cnt2 = unshift(a,3,2,1); 12*0Sstevel@tonic-gateif (join(' ',@a) eq '3 2 1 0 1 2 3') {print "ok 2\n";} else {print "not ok 2\n";} 13*0Sstevel@tonic-gate 14*0Sstevel@tonic-gate 15