in reply to Re^2: why can't I shift a split?
in thread why can't I shift a split?
What I'm seeking is the LAST array element; I want shift to toss the top one.
this is similar to something else I often do successfully:
I was trying to do something similar with shift.. I also tried@_ = split /,/,join "\n",$myscalar
Which I thought had the best chance. Mr TVVALUT has a solution I'll try... I recognize the list/ARRAY difference which is why I was trying various "@{}" constructs to coerce it. Seems like if I can split a join, then I ought to be able to shift a split!shift @_ = split /,/,join "\n",$myscalar
TY all!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: why can't I shift a split?
by tybalt89 (Monsignor) on Aug 25, 2022 at 17:04 UTC | |
by LanX (Saint) on Aug 25, 2022 at 17:33 UTC | |
by tybalt89 (Monsignor) on Aug 25, 2022 at 18:05 UTC | |
by LanX (Saint) on Aug 25, 2022 at 18:19 UTC | |
by tybalt89 (Monsignor) on Aug 25, 2022 at 18:38 UTC | |
|
Re^4: why can't I shift a split?
by Anonymous Monk on Aug 26, 2022 at 16:43 UTC |