This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Test that entries in %^H are actually independant.
[perl5.git] / t / comp / decl.t
CommitLineData
8d063cd8
LW
1#!./perl
2
8d063cd8
LW
3# check to see if subroutine declarations work everwhere
4
5sub one {
6 print "ok 1\n";
7}
8format one =
9ok 5
10.
11
12print "1..7\n";
13
14do one();
15do two();
16
17sub two {
18 print "ok 2\n";
19}
20format two =
21@<<<
22$foo
23.
24
25if ($x eq $x) {
26 sub three {
27 print "ok 3\n";
28 }
29 do three();
30}
31
32do four();
33$~ = 'one';
34write;
35$~ = 'two';
36$foo = "ok 6";
37write;
38$~ = 'three';
39write;
40
41format three =
42ok 7
43.
44
45sub four {
46 print "ok 4\n";
47}