Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Re: Re: Filename Template

by l2kashe (Deacon)
on Aug 07, 2003 at 15:26 UTC ( #281927=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Filename Template
in thread Filename Template

even a simple readdir should do the trick

#!/usr/bin/perl -w use strict; my $dir = '/some/dir'; my $file_re = qr/^(?:\.+|[a-zA-Z]{4}-[0-9]{8})$/; opendir(DIR, $dir) or die "opening $dir: $!\n"; for ( grep(!/$file_re/, readdir(DIR)) ) { # deal with non conforming file names here } closedir(DIR);

use perl;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://281927]
[Discipulus]: ironically from his pubblications: "Can Disarmament Work?"
[erix]: when is the bird-brain's inauguration tweet?
[erix]: (wasn't augur something to with birds too?)
[erix]: augur
[erix]: ah, deciding on the the flight of birds - good idea ;)
[Discipulus]: as good as the Roma foundation
Discipulus we began with a fratricide..

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2017-01-20 13:03 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (174 votes). Check out past polls.