#!./perl
-# $Header: decl.t,v 4.0 91/03/20 01:50:09 lwall Locked $
-
-# check to see if subroutine declarations work everwhere
+# check to see if subroutine declarations work everywhere
sub one {
print "ok 1\n";
}
format one =
-ok 5
+ok 6
.
-print "1..7\n";
+print "1..9\n";
-do one();
-do two();
+one();
+two();
sub two {
print "ok 2\n";
sub three {
print "ok 3\n";
}
- do three();
+ three();
}
-do four();
+four();
+five();
$~ = 'one';
write;
$~ = 'two';
-$foo = "ok 6";
+$foo = "ok 7";
write;
$~ = 'three';
write;
format three =
-ok 7
+ok 8
.
+if ($x eq $x) {
+ goto quux;
+}
+
+print "not ok 9\n";
+exit 1;
+
sub four {
print "ok 4\n";
}
+
+quux:
+sub five {
+ print "ok 5\n";
+}
+print "ok 9\n";