in reply to Beginner question regarding file lists/output
If you're in a *ixish world, why not just ls *index.ccr > indexlist.ccr?
In the Windows world, I think substituting dir for ls, with some appropriate options, may work.
If you're trying to do this from within a Perl program, I'd try something like
#perl -w use strict; use diagnostics; use File::Glob qw(:globally :nocase); my $log = 'indexlist.ccr'; open(LOG, $log) or die "Could not open $log because $!\n"; my @list = <*index.ccr>; print LOG join("\n", @list) . "\n"; close(LOG);
If you're running Windows, you'd probably want to use File::DosGlob;, with appropriate adjustments, instead.
emc
Netlib
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Beginner question regarding file lists/output
by psychotic (Beadle) on Dec 05, 2005 at 23:23 UTC |