in reply to converting from string to SCALAR when using strict "refs"
( The original content of the OP talked about getting around Can't use string ("0") as a SCALAR ref while "strict refs" by turning off strict. )
Unless you really are trying to access the variable $0, use strict 'refs'; caught a real error. Don't ignore it.
Sounds like you did
$ref = @array; or $hoa{foo} = @array; or $aoa[$i] = @array;
earlier in your program where you should have done
$ref = \@array; or $hoa{foo} = \@array; or $aoa[$i] = \@array;
or
$ref = [ @array ]; or $hoa{foo} = [ @array ]; or $aoa[$i] = [ @array ];
|
|---|