Thread 6 Arrays in Modul übergeben (10 answers)
Opened by -Sven- at 2003-10-20 14:53

pq
 2003-10-20 16:34
#65340 #65340
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
@format_c: entweder man nimmt prototypen oder man übergibt
referenzen.
Code: (dl )
1
2
3
4
5
6
7
8
$ perl -wle'
sub test (\@) {
 print "(@_)";
}
@a=qw(a b c);
test(\@a)'
Type of arg 1 to main::test must be array (not reference constructor) at -e line 5, at end of line
Execution of -e aborted due to compilation errors.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread 6 Arrays in Modul übergeben