perl 4.0.00: (no release announcement available)
[p5sagit/p5-mst-13.2.git] / t / comp / decl.t
CommitLineData
8d063cd8 1#!./perl
2
fe14fcc3 3# $Header: decl.t,v 4.0 91/03/20 01:50:09 lwall Locked $
8d063cd8 4
5# check to see if subroutine declarations work everwhere
6
7sub one {
8 print "ok 1\n";
9}
10format one =
11ok 5
12.
13
14print "1..7\n";
15
16do one();
17do two();
18
19sub two {
20 print "ok 2\n";
21}
22format two =
23@<<<
24$foo
25.
26
27if ($x eq $x) {
28 sub three {
29 print "ok 3\n";
30 }
31 do three();
32}
33
34do four();
35$~ = 'one';
36write;
37$~ = 'two';
38$foo = "ok 6";
39write;
40$~ = 'three';
41write;
42
43format three =
44ok 7
45.
46
47sub four {
48 print "ok 4\n";
49}