in reply to Popping Arrays from an Arrays of Arrays
Obviously, the left side is a scalar variable, while the right side is an array slice. That's not a good match. Just for typing reasons, it would be better to have$logtype=@singlefilter[0];
so you're assigning scalar to scalar. Of course, that still won't give you what you want, because you don't want the reference to the array, you want something out of the referenced array:$logtype=$singlefilter[0];
But really, you want to assign several pieces out of the referenced array, so you can go back to using an array slice, assigning to a list:$logtype = ${$singlefilter}[0]; # is the same as $logtype = $singlefilter[0]->[0]; # is the same as $logtype=$singlefilter[0][0];
The usual perldocs are recommended:($logtype, $Regex_Event, $Friendly_Output) = @{$singlefilter[0]}[0,1,2 +];
perldoc perldata perldoc perlreftut perldoc perllol perldoc perlref
|
|---|