Leser: 1
|< 1 2 >| | 14 Einträge, 2 Seiten |
my $x="methode1"; &$x
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
use strict;
no strict 'refs';
use DBI;
use POSIX;
use sigtrap qw(handler terminate_receive normal-signals);
use Compress::Zlib;
use IO::Socket;
my $mypath = "/usr/local";
require $mypath."/news-types.pl";
use vars qw(@NewsType);
use News;
...
for (my $i=1; $i<=$#NewsType; $i++)
{
my $news;
if($NewsType[$i][3])
{
...
}
}
# Das Modul mit den Funktionen (News.pm):
package News;
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(sendnews receivenews);
use strict;
use warnings;
sub sendnews
{
...
}
sub receivenews
{
...
}
# Die Newsarten (news-types.pl):
use vars (@NewsType);
$NewsType[0]=['NewsData','News','receivenews','sendnews'];
1
2
3
4
5
6
7
8
9
10
11
for (my $i=1; $i<=$#NewsType; $i++)
{
my $news;
{
no strict 'refs';
if($NewsType[$i][3])
{
...
}
}
}
QuoteCode: (dl )$NewsType[0]=['NewsData','News','receivenews','sendnews'];
|< 1 2 >| | 14 Einträge, 2 Seiten |