Re: reading directories using perl in windows

2016-03-13 Thread Shawn H Corey
M, 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.

Re: reading directories using perl in windows

2016-03-13 Thread Mike Flannigan
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

Re: reading directories using perl in windows

2016-03-01 Thread Shawn H Corey
On Tue, 1 Mar 2016 15:53:15 +0530 Arghya Das 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

Re: reading directories using perl in windows

2016-03-01 Thread Kent Fredric
On 1 March 2016 at 23:23, Arghya Das wrote: > $dir = "c:/folder/*"; > my @files = glob( $dir ); > > foreach (@files ){ >print $_ . "\n"; > } Personally, I would have used either Path::Tiny, or at least, readdir() here. There's far few places that can lead to strange

Re: reading directories using perl in windows

2016-03-01 Thread Akshay Mohit
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 );

Re: reading directories using perl in windows

2016-03-01 Thread Raj Barath
Try using readdir http://perldoc.perl.org/functions/readdir.html On Tue, Mar 1, 2016, 5:24 AM Arghya Das > wrote: use warnings; $dir = "c:/folder/*"; my @files = glob( $dir ); foreach (@files ){ print $_ . "\n"; } i am trying to read

reading directories using perl in windows

2016-03-01 Thread Arghya Das
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.

Reading Directories

2003-03-25 Thread Jimstone77
Does anyone know how to read a directory in perl, and make a list of all the files therein, and also of any sub directories and their files?

Re: Reading Directories

2003-03-25 Thread Sudarshan Raghavan
On Tue, 25 Mar 2003 [EMAIL PROTECTED] wrote: Does anyone know how to read a directory in perl, and make a list of all the files therein, and also of any sub directories and their files? To get a list of files in a directory (not recursive) perldoc -f glob perldoc File::Glob my @files_list =

Reading Directories

2002-01-16 Thread Caroline Warnock
I'm trying to use the following, in order to be able to print the names of sub-directories within a directory: 1 $folder = /home/cwarnock/public_html/staged/DEVELOPMENT/; 2 3 opendir(DEV, $folder); 4 5 @all_files = readdir(DEV); 6 7 foreach $Name (@all_files) { 8

Re: Reading Directories

2002-01-16 Thread Tanton Gibbs
Warnock [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 16, 2002 11:04 AM Subject: Reading Directories I'm trying to use the following, in order to be able to print the names of sub-directories within a directory: 1 $folder = /home/cwarnock/public_html/staged/DEVELOPMENT/; 2 3

Re: Reading Directories

2002-01-16 Thread Jenda Krynicky
From: Caroline Warnock [EMAIL PROTECTED] I'm trying to use the following, in order to be able to print the names of sub-directories within a directory: 1 $folder = /home/cwarnock/public_html/staged/DEVELOPMENT/; 2 3 opendir(DEV, $folder); 4 5 @all_files =