blob: 948902a97f447529d437d99f00ee71a1a733b46d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!./perl
# $Header: op.unshift,v 2.0 88/06/05 00:15:00 root Exp $
print "1..2\n";
@a = (1,2,3);
$cnt1 = unshift(a,0);
if (join(' ',@a) eq '0 1 2 3') {print "ok 1\n";} else {print "not ok 1\n";}
$cnt2 = unshift(a,3,2,1);
if (join(' ',@a) eq '3 2 1 0 1 2 3') {print "ok 2\n";} else {print "not ok 2\n";}
|