rl.org wrote:
> > Subject:
> > Re: reading directories using perl in windows
> > From:
> > Akshay Mohit
> > Date:
> > 3/1/2016 4:49 AM
> >
> > To:
> > Arghya Das
> > CC:
> > Perl Beginners
> >
> >
> > Could you
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
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 directory path. please help.
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 bugs and security
holes
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 );
Try using readdir http://perldoc.perl.org/functions/readdir.html
On Tue, Mar 1, 2016, 5:24 AM Arghya Das
mailto: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 abo
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.
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 =
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?
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 @a
"Caroline 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:
>
&g
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
12 matches
Mail list logo