foreach (<$lines>) { chomp; for my $l (0..length()-1) { my ($digit) = /^.{$l}(.)/; if (defined $digit) { $row[$current][$l] = $1; } } $current += 1; }
A more Perl way to write that would be:
while ( <$lines> ) { chomp; push @row, [ split // ]; }
In reply to Re: Uninitialized warnings trouble
by jwkrahn
in thread Uninitialized warnings trouble
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |