in reply to Re^3: appending multiple values in an array
in thread appending multiple values in an array
If you store the result of split into a scalar variable like $variable, it will be the number of fields that would have been returned if you'd used an array instead. As such, you probably want to set "@variable = split />/, $reqd_2" instead.
The documentation for push has a better explanation for how to use it than I could supply. For your simple example, I'd write "push @array, $variable".
|
|---|