Thread verkettungsoperatoren ',' und '.' (9 answers)
Opened by styx-cc at 2008-01-09 01:20

pq
 2008-01-09 11:33
#104523 #104523
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
Ronnie+2008-01-09 01:33:40--
Beispiel:
Code: (dl )
1
2
$ perl -we 'my $foo = "foo", "bar"; print $foo'
Useless use of a constant in void context at -e line 1.

das ist etwas irreführend.
ich rufe perl auf der kommandozeile automatisch (auch im schlaf) mit -l auf (-w sowieso)
Code: (dl )
1
2
3
$ perl -wle 'my $foo = "foo", "bar"; print $foo'
Useless use of a constant in void context at -e line 1.
foo

so sieht man wenigstens, was ausgegeben wird.
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 verkettungsoperatoren ',' und '.'