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

Re^3: Printing Last Element of a line using perl memory?

by pemungkah (Priest)
on Mar 11, 2013 at 19:59 UTC ( [id://1022859]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Printing Last Element of a line using perl memory?
in thread Printing Last Element of a line using perl memory?

Thanks! Filing that one.
  • Comment on Re^3: Printing Last Element of a line using perl memory?

Replies are listed 'Best First'.
Re^4: Printing Last Element of a line using perl memory?
by LanX (Saint) on Mar 11, 2013 at 20:09 UTC
    here a way to avoid a temp array

    DB<100> $_=join " ",a..z => "a b c d e f g h i j k l m n o p q r s t u v w x y z" DB<101> $x = (split / /)[-1] => "z"

    Cheers Rolf

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-23 07:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found