in reply to Re: Re: Working with values that dont exist
in thread Working with values that dont exist
change the regex to use the $line variable instead of the default $_.
In place of your for loop, I would suggest using a simple foreach. You don't seem to be using the $i variable anyway. If you want to keep the for loop, you'll need to change it to$line =~ /^(\d{1,2})$/; $points[$1] = 1;
I hope this helps.for ( my $i = 0; $i < scalar @points; $i++ )
|
|---|