Home  |  Linux  | Mysql  | PHP  | XML
From:Eelco Alosery Date:Fri Jan 30 04:04:07 2004
Subject:Re: [MacPerl-AnyPerl] Sorting a file list
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 ??? $/" ;
> }
>

Navigate in group perl.macperl.anyperl at sever nntp.perl.org
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by PHP Developer
Powered By PHP Consultants