Re: What's being thrown away?



On 12/31/2006 05:04 AM, Mathew Snyder wrote:
In the following snippet of code I'm getting the "useless use of a private
variable in a void context" error. It is at line 64 which is the closing brace
for the for loop.

for ($count; [...]

It's here, in the first instance of $count. $Count is neither assigned to nor used for anything


HTH


.



Relevant Pages

  • Re: Whats being thrown away?
    ... Mathew Snyder wrote: ... variable in a void context" error. ... It is at line 64 which is the closing brace ... But it doesn't look like you are using $count inside the loop anyway so why ...
    (perl.beginners)
  • Re: Whats being thrown away?
    ... I replaced the for loop with a while loop and it eliminated the problem. ... Mathew Snyder wrote: ... variable in a void context" error. ... push @days, $day; ...
    (perl.beginners)
  • Re: make(1) is broken?
    ... Results for VAR2 seems quite strange for me. ... The second closing brace doesn't belong to ... why does it work within the for loop? ... Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing ...
    (freebsd-hackers)
  • Re: large array in a single line
    ... ie there is automatic split in line after 76 characters. ... If so, the first problem is that rangestarts with 0 and ends just before 100, so you only get the values 0 to 99. ... Create a for loop, iterate over the list q, writing each value with a trailing space, and follow the loop with one extra write, containing the closing brace, and the newline. ...
    (comp.lang.python)
  • Re: Scalar variable in void context before a loop
    ... variable to be used as an iterator in void context before the loop. ... I am curious as to what reasons there are for doing this, ...
    (comp.lang.perl.misc)