in reply to Why is DBI returning a ref to a ref to a ref to a list? (code)
@foo=$arrayref makes a one element array containing that reference. @foo=@{$arrayref} will probably do what you want. sample :
OK?$bar=1; @foo=$bar; print @foo,"\n"; $bar=["this","is","an","arrayref"]; @foo=$bar; print @foo,"\n"; @foo=@{$bar}; print @foo,"\n"; $bar=&baz; @foo=@{$bar}; print @foo,"\n"; @foo=@{&baz}; print @foo,"\n"; sub baz { return["this","is","also","an","arrayref"]; }
|
|---|