in reply to Presenting a local listing of remote files over HTTP
This is a Faster Way To Do It. :)sub commify { my $text = reverse $_[0]; $text =~ s/(\d{3})(?=\d)(?!\d*\.)/$1,/g; return scalar reverse $text; }
Also, you will probably most likely want to add \z to your regexes that check for archived files:
to avoid pesky files named something like foo.tar.gz.fooif ($beta =~ /tar.gz\z/) { ...
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Presenting a local listing of remote files over HTTP
by hacker (Priest) on Jul 03, 2002 at 19:45 UTC | |
by Aristotle (Chancellor) on Jul 04, 2002 at 03:40 UTC |