Thread Parameter an Sub übergeben (8 answers)
Opened by pktm at 2003-12-01 17:07

esskar
 2003-12-01 18:32
#73583 #73583
User since
2003-08-04
7321 Artikel
ModeratorIn

user image
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package MyModul;

sub new
{
my $self = {};

bless $self, shift;

return $self;
}

sub gettext
{
my ($self, $id) = @_;
return ++$id if defined $id;
}

1;

my $m = new MyModul();
print $m->gettext(15);

View full thread Parameter an Sub übergeben