Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Non-regex Methods of Extracting the Last Field from a Record

by codeacrobat (Chaplain)
on May 08, 2009 at 06:08 UTC ( #762754=note: print w/replies, xml ) Need Help??


in reply to Non-regex Methods of Extracting the Last Field from a Record

Your @junk already consumes all splitted elements. There is no boundary on @junk that would prevent it to do otherwise.
(@junk, $ads) = (split(/\s+/, $rec)); # the same here (@foo, $bar) = @baz; # only this way it works ($first,$second,@remaining) = @all
P.S. If you are using split then you are already using regular expressions.

print+qq(\L@{[ref\&@]}@{['@'x7^'!#2/"!4']});

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2021-09-17 08:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?