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; $count < 7; $count++) {
       ^^^^^^
$count is in a void context there.  Either:

for ( my $count; $count < 7; $count++ ) {

Or:

for ( $count = 0; $count < 7; $count++ ) {

etc.

But it doesn't look like you are using $count inside the loop anyway so why
not just:

for ( 0 .. 6 ) {

And if you *really* need $count then:

for my $count ( 0 .. 6 ) {


>         if ($day == '01') {

You are using a numerical comparison on a string.  Either:

          if ( $day == 1 ) {

Or:

          if ( $day eq '01' ) {



John
-- 
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order.       -- Larry Wall

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to