in reply to Re: Annoying 'Use of uninitialized value in concatenation' warning
in thread Annoying 'Use of uninitialized value in concatenation' warning
You can confine the no warnings 'uninitialised'; to the lexical scope but you can make it even tighter if you wish by confining it to the print with the use of a do block.
for (my $ii=0; $ii < scalar(@some_array); $ii++) { print do { no warnings 'uninitialized'; # for the do block only "Value at position $ii: $some_array[$ii]\n"; }; }
I hope this is of interest.
Cheers,
JohnGG
|
|---|