in reply to Re: How do I sort by certain parts of a filename?
in thread How do I sort by certain parts of a filename?

Masem wrote:
${split(/_/,$b)}[0] }
To be certain, I tried it, but it doesn't give me the first field of a split. Did you mean:
[split /_/, $b]->[0]
?

(This is what I usually do, but maybe there is a better Way out there....)

Jeroen
"We are not alone"(FZ)

Replies are listed 'Best First'.
(tye)Re: How do I sort by certain parts of a filename?
by tye (Sage) on May 10, 2001 at 10:24 UTC

    Even shorter (and faster) is: (split /_/, $b)[0]

            - tye (but my friends call me "Tye")
      That shall learn me to pay attention when doing print some_expr....

      print (split)[0]; failed on me, but of course I should have tested print +(split)[0];. Aargg!

      Jeroen
      "We are not alone"(FZ)