How do I get a list of directories within a directory into an array ?
Can I remove directories containing files in perl ?
Thanks
Kobby
_
This transmission has been issued by a member of the HSBC Group
"HSBC" for the information of the ad
[EMAIL PROTECTED] wrote:
> How do I get a list of directories within a directory into an array ?
Untested:
opendir DIR, $dir or die "opendir $dir: $!";
my @dirs = grep { -d && ! /^\.{1,2}$/ } readdir DIR;
closedir DIR;
> Can I remove directories containing files in perl ?
use File::Path;
rmtre
Hi,
Is there a function in Perl that will convert a
relative path to an absolute path? Does anybody
have such a script? Or, if you can point me to where
I should start looking for writing my own script, I will apprciate it.
Thanks,
--tassos
[EMAIL PROTECTED] wrote:
> Hi,
>
> Is there a function in Perl that will convert a
> relative path to an absolute path? Does anybody
> have such a script? Or, if you can point me to where
> I should start looking for writing my own script, I will apprciate it.
Look in Cwd.pm (snippet from module
[EMAIL PROTECTED] wrote:
> Hi,
>
> Is there a function in Perl that will convert a
> relative path to an absolute path? Does anybody
> have such a script? Or, if you can point me to where
> I should start looking for writing my own script, I will apprciate it.
Another possibilty:
File::Spec
--