Newsgroups: fj.lang.perl
Path: galaxy.trc.rwcp.or.jp!coconuts.jaist!wnoc-tyo-news!news.nc.u-tokyo.ac.jp!newssinet!sinetnews!eclnews!news.ipc.chiba-u!news.tj.chiba-u!asada
From: asada@ics.tj.chiba-u.ac.jp (Takuya Asada)
Subject: Re: sort question (Re: perl beginner's question)
Message-ID: <DLz7FH.9Kt@ics.tj.chiba-u.ac.jp>
Sender: usenet@ics.tj.chiba-u.ac.jp
Nntp-Posting-Host: icsj6.tj.chiba-u.ac.jp
Organization: Chiba-University
References: <OZAWA.96Jan29231150@tulip.pe.u-tokyo.ac.jp>
Date: Tue, 30 Jan 1996 04:06:52 GMT
Lines: 16
Xref: galaxy.trc.rwcp.or.jp fj.lang.perl:696
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.lang.perl&nb=696&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

$B$"$5$@$J$N$G$9!#(B

grepper $B>._7$5$s(B>
> > $B$H$$$&$h$&$J%j%9%H$r:G=i$N?t;z$NCM$N=gHV$GJB$Y$+$($k$N$K$O(B
> > $B$I$&$7$?$i$$$$$N$G$7$g$&$+!%(B
> $B>e5-%j%9%H$r2?$+$+$iFI$_$3$_!$$H$j$"$($:!$(B@list $B$KF~$l$^$9!%(B

$B;d$@$C$?$i$3$N8e!"(B

@sorted = sort {(split(/,/,$a))[0] <=> (split(/,/,$b))[0]} @list;

$B$G$9$+$M$'!D(B @list $B$,Bg$-$/$J$C$F$/$k$H!"8zN(E*$K$A$g$C$H%"%l(B
$B$+$b$7$l$^$;$s$G$9$M!#(B

$B$"$5$@(B $B$?$/$d(B

