Re: [MacPerl-AnyPerl] Sorting a file list

[email protected] (Eelco Alosery) Fri, 30 Jan 2004 12:04:07 +0100
Newsgroups perl.macperl.anyperl
Message-ID <[email protected]>
Thanks again John,

I will gif it some testing, and testing until i get it done.



Op 30-jan-04 om 11:04 heeft John Delacour het volgende geschreven:

>
> At 12:37 am +0100 30/1/04, Eelco Alosery wrote:
>
>> how do i combine this together
>
> Like this, but now it's time for _you_ to do some footwork :-)
>
>
> my $db = "/tmp/tmp";
> my ($date, $s1, $s2);
> open DB, $db;
> for (<DB>) {
>   s~^(..)-(..)-(....)(.+)~$3$2$1$4~;
>   push @temp, $_ ;
> }
> for (sort @temp) {
>   chomp;
>   s~(....)(..)(..)(.+)~$3-$2-$1$4~;
>   ($date, $s1, $s2) = split /\|/ ;
>   $date and print "??? $date ??? $s1 ??? $s2 ??? $/" ;
> }
>