Thread Useless use of private variable in void context (9 answers)
Opened by der_thomas at 2014-01-06 23:07

Gast wer
 2014-01-06 23:28
#172867 #172867
Code (perl): (dl )
1
2
my $zz = $zeiger - 1;
for ($zz; $zz > -1; $zz--)

Besser:
Code (perl): (dl )
1
2
my $zz = $zeiger - 1;
for (; $zz > -1; $zz--)

oder:
Code (perl): (dl )
for(my $zz = $zeiger - 1; $zz > -1; $zz--)

oder:
Code (perl): (dl )
for my $zz (reverse( 0 .. $zeiger - 1))

Last edited: 2014-01-07 00:07:13 +0100 (CET)

View full thread Useless use of private variable in void context