Noame has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
How can I check if directory existing using regexp? I have 2 variables include part of the dir. name:
$stream = 241 $version = 73
The Dir Name is: 241.73_Dir_Name
And I want to check if that directory exists, somting like:
if ( -d "$stream.$version\_\w*/") ...Please advice,
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Check if dir exist using regexp
by Fletch (Bishop) on Nov 20, 2007 at 16:01 UTC | |
|
Re: Check if dir exist using regexp
by johngg (Canon) on Nov 20, 2007 at 16:03 UTC | |
|
Re: Check if dir exist using regexp
by tuxz0r (Pilgrim) on Nov 20, 2007 at 16:59 UTC | |
|
Re: Check if dir exist using regexp
by perlfan (Parson) on Nov 20, 2007 at 16:01 UTC | |
|
Re: Check if dir exist using regexp
by olus (Curate) on Nov 20, 2007 at 16:06 UTC |