perl 1.0 patch 1: Portability bugs and one possible SIGSEGV
[p5sagit/p5-mst-13.2.git] / t / op.chop
1 #!./perl
2
3 # $Header: op.chop,v 1.0 87/12/18 13:13:11 root Exp $
4
5 print "1..2\n";
6
7 # optimized
8
9 $_ = 'abc';
10 $c = do foo();
11 if ($c . $_ eq 'cab') {print "ok 1\n";} else {print "not ok 1\n";}
12
13 # unoptimized
14
15 $_ = 'abc';
16 $c = chop($_);
17 if ($c . $_ eq 'cab') {print "ok 2\n";} else {print "not ok 2\n";}
18
19 sub foo {
20     chop;
21 }