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.
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
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 );
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
On Tue, 1 Mar 2016 12:05:14 +0530
Arghya Das wrote:
> $num = 1234;
> $sum = 0;
>
> while ( $num != 0)
> {
> $rem = $num % 10;
> $sum = ( $sum * 10 ) + $rem;
> $num = $num / 10;
$num = int( $num / 10 );
> }
>
> print $sum;
>
>
>
> please tell what is wrong with the reverse number code .
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.