On Tue, 1 Mar 2016 15:53:15 +0530 Arghya Das <arghya0...@gmail.com> wrote:
> use warnings; > > $dir = "c:/folder/*";my @files = glob( $dir ); > foreach (@files ){ > print $_ . "\n";} > > > i am trying to read windows directory using above code but it gives > errors in recognising tthe directory path. please help. Does the directory path have spaces in its names? If so, glob() does not work correctly. Use the BSD glob() instead. use File::Glob qw( :bsd_glob ); See `perldoc File::Glob` for details. http://perldoc.perl.org/File/Glob.html -- Don't stop where the ink does. Shawn -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/