in reply to Re: Some problem pattern matching
in thread Some problem pattern matching
Rather than:for my $cont_name (@cont_names) { # do stuff with $cont_name }
When you don't specifically need the index number, it's best to avoid it altogether. Not dealing with the array index number makes your code more readable, more maintainable, and less error-prone.for ($c=0; $c < scalar(@cont_names); $c++) { # do stuff with $cont_names[$c] }
|
|---|