in reply to Re: Long array -> multiple columns?
in thread Long array -> multiple columns?

$i was previously declared, I should have mentioned that. This is a snippet of the entire code. Like I said, I only just learned Perl. I learned C last semester and the stuff I do at my work is a lot of string-manipulation stuff so that's why I switched. I wrote the initial thing when I was still making the transition from C to Perl -- I'd basically write C code with Perl. I'm getting much better at coding Perl-style-Perl but it's been a month. I also did not know I could hide specific warnings. Thanks.

Replies are listed 'Best First'.
Re^3: Long array -> multiple columns?
by ikegami (Patriarch) on Jan 30, 2008 at 06:52 UTC

    The reason I mentioned $i is that you reuse the variable (not just the name). I typically view that as bad, especially when it's trivial to declare it for the loop itself.

    || vv for my $i (1..5) { ... }