FYI, there is no error.  If the directory
path has no spaces it works fine, if the directory
path has spaces it prints the path up to the 1st space
and just goes back to a cursor line.


Mike


On 3/6/2016 5:04 AM, beginners-digest-h...@perl.org wrote:
Subject:
Re: reading directories using perl in windows
From:
Akshay Mohit <akshaymohit2...@gmail.com>
Date:
3/1/2016 4:49 AM

To:
Arghya Das <arghya0...@gmail.com>
CC:
Perl Beginners <beginners@perl.org>


Could you please send the exact error which you are getting as I Copy/Pasted the exact code which you had given and it is working properly for me. I have only given the directory which is present in my system.

use strict;
use warnings;

my $dir = "C:/Python_Exercise/*";
my @files = glob( $dir );

foreach (@files ){
   print $_ . "\n";
}

Reply via email to