Thread Perl - Sub Routinen Parameter. (33 answers)
Opened by Gast at 2004-04-13 21:22

Knuddlbaer
 2004-04-14 12:53
#81531 #81531
User since
2004-04-13
32 Artikel
BenutzerIn
[default_avatar]
Aaallsoooo:

Code: (dl )
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
package test;
@EXPORT = qw(new);
sub new
{
 my $self = {};
 bless $self;
 return $self;

}

sub test
{
   $self->test2("Hallo Welt");
}

sub test2
{
print "\n";
my $i = 0;
   foreach(@_)
   {
       print "$i : $_\n";
       $i++;  }


}


Fürht zu:

Quote
Can't call method "test2" on an undefined value at test.pm line 13.


Ich denke da hab ich generell noch was falsch ?! :o(

View full thread Perl - Sub Routinen Parameter.