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