[Perl-unix-users] List of directories in a directory

2002-09-26 Thread kwabena . asare
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

Re: [Perl-unix-users] List of directories in a directory

2002-09-26 Thread $Bill Luebkert
[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

[Perl-unix-users] converting relative to absolute path

2002-09-26 Thread Tassos123
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

Re: [Perl-unix-users] converting relative to absolute path

2002-09-26 Thread $Bill Luebkert
[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

Re: [Perl-unix-users] converting relative to absolute path

2002-09-26 Thread $Bill Luebkert
[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 --