... something in your @HR is coming up as an undef.
I was going to write that a simple empty array could also produce an "... uninitialized value in printf ..." warning, but warnings apparently got a little bit smarter in version 5.12:
(See 'Missing argument in %s' in perldiag in version 5.12 and after.)c:\@Work\Perl>perl -wMstrict -le "print 'perl version ', $]; ;; my @HR; ;; printf qq{A: %s \n}, @HR; ;; ++$#HR; printf qq{B: %s \n}, @HR; " perl version 5.008009 Use of uninitialized value in printf at -e line 1. A: Use of uninitialized value in printf at -e line 1. B: perl version 5.010001 Use of uninitialized value in printf at -e line 1. A: Use of uninitialized value in printf at -e line 1. B: perl version 5.012003 Missing argument in printf at -e line 1. A: Use of uninitialized value in printf at -e line 1. B: perl version 5.014004 Missing argument in printf at -e line 1. A: Use of uninitialized value in printf at -e line 1. B:
Update: Posted this reply before seeing other, closely related replies: this from Monk::Thomas and this from hippo.
Give a man a fish: <%-{-{-{-<
In reply to Re^2: Troubleshooting perl runtime errors
by AnomalousMonk
in thread Troubleshooting perl runtime errors
by lvirden
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |