in reply to Is this sort of possible
grep#!/usr/bin/perl -w use strict; my @FILE = ('123|title|1/1/01','123|btitle|1/1/01','123|atitle|1/1/01' +); print @FILE,"\n"; my @output = map { $_->[0] } sort { $a->[1] cmp $b->[1] } map { [$_, (split(/\|/,$_))[1]] } @FILE; print @output,"\n";
|
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Is this sort of possible
by derby (Abbot) on Dec 31, 2001 at 19:23 UTC |