projects
/
p5sagit/p5-mst-13.2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
delete() should return the value as is, not a copy thereof
[p5sagit/p5-mst-13.2.git]
/
t
/
op
/
pos.t
1
#!./perl
2
3
print "1..3\n";
4
5
$x='banana';
6
$x=~/.a/g;
7
if (pos($x)==2) {print "ok 1\n"} else {print "not ok 1\n";}
8
9
$x=~/.z/gc;
10
if (pos($x)==2) {print "ok 2\n"} else {print "not ok 2\n";}
11
12
sub f { my $p=$_[0]; return $p }
13
14
$x=~/.a/g;
15
if (f(pos($x))==4) {print "ok 3\n"} else {print "not ok 3\n";}
16