Re: regex question matching dates
- From: krahnj@xxxxxxxxx (John W. Krahn)
- Date: Wed, 28 May 2008 21:47:47 -0700
John W. Krahn wrote:
Richard Lee wrote:
@array = qx#ls -tr $directory/$ARGV[0]*#;
Why not do that directly in perl:
@array = map $_->[0], sort { $a->[1] <=> $b->[1] } map [ $_, -M ], glob "$directory/$ARGV[0]*";
Sorry, that should be:
@array = map $_->[0], sort { $b->[1] <=> $a->[1] } map [ $_, -M ], glob "$directory/$ARGV[0]*";
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
.
- References:
- regex question matching dates
- From: Richard Lee
- Re: regex question matching dates
- From: John W. Krahn
- regex question matching dates
- Prev by Date: Re: regex question matching dates
- Next by Date: Re: regex question matching dates
- Previous by thread: Re: regex question matching dates
- Next by thread: Re: regex question matching dates
- Index(es):
Relevant Pages
|