perl中经常有会遇到处理CSV格式的文件,这样的文件类似二维数组,因此实际上的操作时对二维数组的操作了。
对这样的行列表格,我们常常需要按照某列,或者先按照某列,再按另一列进行排序,具体的操作可以看一下下面的实现:
-
-
#!/usr/bin/perl
-
my @line;
-
while(<>)
-
{
-
chomp;
-
push @line, [ split ];
-
}
-
foreach ( sort { $a->[0] <=> $b->[0] or $a->[1] <=> $b->[1] or $a->[2] <=> $b->[2] } @line)
-
{
-
print @$_, "n";
-
}
注意:
对于大的文件,最好不要这么用。
该脚本会把数据全部搬到内存。
www.bbilo.com/gbdfzmzc www.bbilo.com/gbdfbjl www.bbilo.com/gbdfylyq www.bbilo.com/mdgbdfrqrh www.bbilo.com/gbdfmdyjm www.bbilo.com/mdgbdfaqm www.bbilo.com/gbdfkmdl www.bbilo.com/gbdfxwz www.bbilo.com/gbdfwtzx www.bbilo.com/gbdfdms www.bbilo.com/gbdfzc www.bbilo.com/gbdfsy www.bbilo.com/gbdfwzx www.bbilo.com/gbdfnyqb www.bbilo.com/gbdfzj www.bbilo.com/gbdfdz www.jdcvv.com/gbdfylw www.jdcvv.com/gbdf www.jdcvv.com/gbdfkh www.jdcvv.com/gbdfyl www.jdcvv.com/gbdfhykh www.jdcvv.com/1659988_comgbdf www.jdcvv.com/gbdfshy www.jdcvv.com/gbdfgw www.jdcvv.com/gbdfwt www.jdcvv.com/gbdfylc www.jdcvv.com/gbdfdl www.jdcvv.com/gbdfxc www.jdcvv.com/gbdfyldl www.jdcvv.com/gbdfylkh www.jdcvv.com/gggbdfylc www.jdcvv.com/gbdfsjzmdl www.jdcvv.com/gbdfzmnyq www.jdcvv.com/gbdfyj www.jdcvv.com/gbdfxmf www.jdcvv.com/szdmdgbdf www.jdcvv.com/mdgbdf www.jdcvv.com/gbdfdlkh www.jdcvv.com/gbdfkh1581260 www.jdcvv.com/gbdfylhbwz www.jdcvv.com/gbdfyq www.jdcvv.com/sygbdfyl www.jdcvv.com/gbdfylzmyq www.jdcvv.com/gbdfylyflm www.jdcvv.com/gbdfylcznl www.jdcvv.com/gbdfwz www.jdcvv.com/gbdftz www.jdcvv.com/gbdfdh www.jdcvv.com/gbdfsj www.jdcvv.com/gggbdf www.jdcvv.com/gbdfgfw www.jdcvv.com/gbdfkhw www.jdcvv.com/gbdfsh www.jdcvv.com/gbdfsjxz www.jdcvv.com/gbdfylsjxz www.jdcvv.com/gbdfwfm www.jdcvv.com/gbdfdtkh www.jdcvv.com/gbdfhy www.jdcvv.com/gbdfrhkh www.jdcvv.com/gbdfzdl www.jdcvv.com/gbdfw www.jdcvv.com/gbdfdtkmdl www.jdcvv.com/gbdfglw www.jdcvv.com/gbdfxjw www.jdcvv.com/gbdfwtkhzx www.jdcvv.com/gbdfwtdhkh www.jdcvv.com/gbdfwkh www.jdcvv.com/gbdfwthykh www.jdcvv.com/gbdftgy www.jdcvv.com/gbdfylwz www.jdcvv.com/gbdfzmzc www.jdcvv.com/gbdfbjl www.jdcvv.com/gbdfylyq www.jdcvv.com/mdgbdfrqrh www.jdcvv.com/gbdfmdyjm www.jdcvv.com/mdgbdfaqm www.jdcvv.com/gbdfkmdl www.jdcvv.com/gbdfxwz www.jdcvv.com/gbdfwtzx www.jdcvv.com/gbdfdms www.jdcvv.com/gbdfzc www.jdcvv.com/gbdfsy www.jdcvv.com/gbdfwzx www.jdcvv.com/gbdfzj www.jdcvv.com/gbdfdz www.vqjqu.com/gbdf www.vqjqu.com/gbdfkh www.vqjqu.com/gbdfylw www.vqjqu.com/gbdfyl www.vqjqu.com/gbdfhykh www.vqjqu.com/1659988_comgbdf www.vqjqu.com/gbdfdhtz www.vqjqu.com/gbdfylpt www.vqjqu.com/gbdfshy www.vqjqu.com/gbdfzxkh www.vqjqu.com/gbdfgw www.vqjqu.com/gbdfwt www.vqjqu.com/gbdfylc www.vqjqu.com/gbdfdl www.vqjqu.com/gbdfxc www.vqjqu.com/gbdfyldl www.vqjqu.com/gbdfkhbl www.vqjqu.com/gbdfylkh www.vqjqu.com/gbylgbdf www.vqjqu.com/gggbdfylc www.vqjqu.com/gbdfsjzmdl www.vqjqu.com/gbdfylfl www.vqjqu.com/gbdfzmnyq www.vqjqu.com/gbdfyj www.vqjqu.com/gbdfxmf www.vqjqu.com/szdmdgbdf www.vqjqu.com/mdgbdf www.vqjqu.com/gbdfdhkh www.vqjqu.com/gbdfdlkh www.vqjqu.com/gbdfwtkh www.vqjqu.com/gbdfkh1581260 www.vqjqu.com/gbdfylhbwz www.vqjqu.com/gbdfyq www.vqjqu.com/sygbdfyl www.vqjqu.com/gbdfylzmyq www.vqjqu.com/gbdfylyflm www.vqjqu.com/gbdfylcznl www.vqjqu.com/gbdfwz www.vqjqu.com/gbdftz www.vqjqu.com/gbdfdh www.vqjqu.com/gbdfsj www.vqjqu.com/gggbdf www.vqjqu.com/gbdfgfw www.vqjqu.com/gbdfkhw www.vqjqu.com/gbdfsh www.vqjqu.com/gbdfylsjxz www.vqjqu.com/gbdfwfm www.vqjqu.com/gbdfhy www.vqjqu.com/gbdfzdl www.vqjqu.com/gbdfw www.vqjqu.com/gbdfdtkmdl www.vqjqu.com/gbdfglw www.vqjqu.com/gbdfxjw www.vqjqu.com/gbdfwtkhzx www.vqjqu.com/gbdfwtdhkh www.vqjqu.com/gbdfwkh www.vqjqu.com/gbdfwthykh www.vqjqu.com/gbdftgy www.vqjqu.com/gbdfylwz www.vqjqu.com/gbdfzmzc www.vqjqu.com/gbdfbjl www.vqjqu.com/gbdfylyq www.vqjqu.com/mdgbdfrqrh www.vqjqu.com/gbdfmdyjm www.vqjqu.com/mdgbdfaqm www.vqjqu.com/gbdfkmdl www.vqjqu.com/gbdfxwz www.vqjqu.com/gbdfwtzx www.vqjqu.com/gbdfdms www.vqjqu.com/gbdfzc www.vqjqu.com/gbdfsy www.vqjqu.com/gbdfwzx www.vqjqu.com/gbdfnyqb www.vqjqu.com/gbdfzj www.vqjqu.com/gbdfdz www.ecbga.com/gbdf www.ecbga.com/gbdfkh www.ecbga.com/gbdfylw www.ecbga.com/gbdfyl www.ecbga.com/gbdfhykh www.ecbga.com/1659988_comgbdf www.ecbga.com/gbdfdhtz www.ecbga.com/gbdfylpt www.ecbga.com/gbdfshy www.ecbga.com/gbdfzxkh www.ecbga.com/gbdfgw www.ecbga.com/gbdfwt www.ecbga.com/gbdfylc www.ecbga.com/gbdfdl www.ecbga.com/gbdfxc www.ecbga.com/gbdfyldl www.ecbga.com/gbdfkhbl www.ecbga.com/gbdfylkh www.ecbga.com/gbylgbdf www.ecbga.com/gggbdfylc www.ecbga.com/gbdfsjzmdl www.ecbga.com/gbdfylfl www.ecbga.com/gbdfzmnyq www.ecbga.com/gbdfyj www.ecbga.com/gbdfxmf www.ecbga.com/szdmdgbdf www.ecbga.com/mdgbdf www.ecbga.com/gbdfdhkh www.ecbga.com/gbdfdlkh www.ecbga.com/gbdfwtkh www.ecbga.com/gbdfkh1581260 www.ecbga.com/gbdfylhbwz www.ecbga.com/gbdfyq www.ecbga.com/sygbdfyl www.ecbga.com/gbdfylzmyq www.ecbga.com/gbdfylyflm www.ecbga.com/gbdfylcznl www.ecbga.com/gbdfwz www.ecbga.com/gbdftz www.ecbga.com/gbdfdh www.ecbga.com/gbdfsj www.ecbga.com/gggbdf www.ecbga.com/gbdfgfw www.ecbga.com/gbdfkhw www.ecbga.com/gbdfsh www.ecbga.com/gbdfylsjxz www.ecbga.com/gbdfwfm www.ecbga.com/gbdfdtkh www.ecbga.com/gbdfhy www.ecbga.com/gbdfrhkh www.ecbga.com/gbdfzdl www.ecbga.com/gbdfw www.ecbga.com/gbdfdtkmdl www.ecbga.com/gbdfglw www.ecbga.com/gbdfxjw www.ecbga.com/gbdfwtkhzx www.ecbga.com/gbdfwtdhkh www.ecbga.com/gbdfwkh www.ecbga.com/gbdfwthykh www.ecbga.com/gbdftgy www.ecbga.com/gbdfylwz www.ecbga.com/gbdfzmzc www.ecbga.com/gbdfbjl www.ecbga.com/gbdfylyq www.ecbga.com/mdgbdfrqrh www.ecbga.com/gbdfmdyjm www.ecbga.com/mdgbdfaqm www.ecbga.com/gbdfkmdl www.ecbga.com/gbdfxwz www.ecbga.com/gbdfwtzx www.ecbga.com/gbdfdms www.ecbga.com/gbdfzc www.ecbga.com/gbdfsy www.ecbga.com/gbdfwzx www.ecbga.com/gbdfnyqb www.ecbga.com/gbdfzj www.ecbga.com/gbdfdz www.urukw.com/gbdf www.urukw.com/gbdfkh www.urukw.com/gbdfylw www.urukw.com/gbdfyl www.urukw.com/gbdfhykh www.urukw.com/1659988_comgbdf www.urukw.com/gbdfdhtz www.urukw.com/gbdfylpt www.urukw.com/gbdfshy www.urukw.com/gbdfzxkh www.urukw.com/gbdfgw www.urukw.com/gbdfwt www.urukw.com/gbdfylc www.urukw.com/gbdfdl www.urukw.com/gbdfxc