Nope, it's another problem just at the same place.
Using my fixes the errors but not the OP's problem, which is foreach localization and aliasing.
use warnings; use strict; my $string; my @array_of_strings=1..3; my $sref = \$string; foreach $string ( @array_of_strings ) { print $$sref; } __END__ Use of uninitialized value in print at - line 8. Use of uninitialized value in print at - line 8. Use of uninitialized value in print at - line 8. lanx@nc10-ubuntu:~$
Cheers Rolf
In reply to Re^4: Dereference string in foreach
by LanX
in thread Dereference string in foreach
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |