普通の「require」

                             <p>ソースコード</p>
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/perl

#BEGIN{
#   print "Content-type: text/plainnn";
#   open(STDERR, ">&amp;STDOUT");
#   $|=1;
#}

$usr_title = 'テスト28';

require "tsenv.pl";
require "hoge.pl";

{
    printHeader($usr_title);
    printBodyHeader($usr_title);

    @_ = ('ホゲ1','ほげ2','hoge3');
    $_ = 'hogeほげgehoげほ';

    print '$_ = ';
    Jprint($_);
    print "<br>n";

    print '@_ = ';
    Jprint(join(',', @_));
    print "<br>n";
    print "<br>n";

    Jprint('&amp;hoge::hogeprint;で呼出し<br>');
    &amp;hoge::hogeprint;
    Jprint('&amp;hoge::hogeprint();で呼出し<br>');
    &amp;hoge::hogeprint();
    Jprint('&amp;hoge::hogeprint($_);で呼出し<br>');
    &amp;hoge::hogeprint($_);
    print "<br>n";

    Jprint('&amp;hoge::hogeprint;で配列呼出し<br>');
    foreach(@_){
        &amp;hoge::hogeprint;
    }
    print "<br>n";

    Jprint('&amp;hoge::hogeprint($_);で配列呼出し<br>');
    foreach(@_){
        &amp;hoge::hogeprint($_);
    }
    print "<br>n";

    Jprint('Jprint(hoge::hogereturn);で呼出し(不可。文字列と解釈される)<br>');
    Jprint(hoge::hogereturn);
    print "<br>n";

    Jprint('Jprint(hoge::hogereturn());で呼出し<br>');
    Jprint(hoge::hogereturn());
    Jprint('Jprint(hoge::hogereturn($_));で呼出し<br>');
    Jprint(hoge::hogereturn($_));
    print "<br>n";

    print '$hoge::version = ';
    print $hoge::version;
    print "<br><br>n";

    print '@hoge::version = ';
    print foreach(@hoge::version);
    print "<br><br>n";

    print '%hoge::version = ';
    print "$_ => $hoge::version{$_}" foreach(keys %hoge::version);
    print "<br><br>n";

    Jprint('hogehoge();で呼出し<br>');
    hogehoge();

    printFooter();

    exit(0);
}
                          </div>

Comments

comments powered by Disqus