Thread sub blubb ($)??: was bewirkt das $?? (3 answers)
Opened by steinwolf at 2003-09-03 20:14

pq
 2003-09-03 20:30
#83660 #83660
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
Code: (dl )
1
2
3
4
5
6
$ perl -wle'
sub meinefunktion($) { }
meinefunktion()'
Not enough arguments for main::meinefunktion at -e line 5, at end of line
Execution of -e aborted due to compilation errors.
$


($) ist ein prototyp, der verlangt, dass die funktion (in diesem
fall) mit genau einem parameter aufgerufen wird. <!--pod1--><a href="//www.perldoc.com/perl5.8.0/pod/perlsub.html" target="_blank">perldoc <!--pod2-->perlsub<!--pod3--></a><!--pod4-->\n\n

<!--EDIT|pq|1062606654-->
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 sub blubb ($)??: was bewirkt das $??