This code:
push(@{$matchedfiles[$c]}, [ ... ]); Is incorrect, it's usually a bad idea to use the index from one array to index into another array. $c holds the position in your fileinfo array but $matchedfiles[$c] is not defined yet. The error is compounded when you use $matchedfiles[$c] as an array reference as perl will automatically cause that element to spring to life ( and everything below it ) even if that element was not previously defined. This is called 'autovivification' and can be useful; but in this case is merely a troublesome side-effect of using an undefined reference.
In reply to Re: Uninitialized value in concatenation (.) or string?
by starbolin
in thread Uninitialized value in concatenation (.) or string?
by jbush82
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |