Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4: why can't I shift a split?

by tybalt89 (Monsignor)
on Aug 25, 2022 at 17:04 UTC ( [id://11146425]=note: print w/replies, xml ) Need Help??


in reply to Re^3: why can't I shift a split?
in thread why can't I shift a split?

"LAST array element"

my $last = ( split /,/,join "\n",$myscalar )[-1];

Replies are listed 'Best First'.
Re^5: why can't I shift a split?
by LanX (Saint) on Aug 25, 2022 at 17:33 UTC
    This

    join "\n",$myscalar

    looks like a useless no-op.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      Sure, but let's just fix one problem at a time :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11146425]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-26 01:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found