On 11/07/12 17:40:59, Dirk wrote:
> Hi,
>
> I am new to Perl and I am trying to list all the folders within a given
> folder and I have the following code. I know it is simple but for some
> reason the program just stops and I am not seeing any error code being
> returned.
>
> #!/usr/bin/perl
> #
>
> use warnings;
> use strict;
> use File::Find;
>
> my $path_name;
> $path_name = '/test';
>
> find sub {
> return unless -d;
> print "$File::Find::name\n";
> },$path_name;
>
> exit;
Does '/test' exist on your system?
What happens if you try $path_name = '..'; ?
-- HansM
|