Hi all,

 

Kindly look at the code below:

 

use warnings;

use strict;

opendir(DIR, "D:\\test") || die "can't opendir:  $!";

my @dots = readdir(DIR);

print map{"$_.\n"}...@dots;

 

..

...

Test1

Test2

Test3

 

Where Test1, Test2, Test3 are files within test directory.

 

Apart from that I also got dots (2 in 1st line & 3 in 2nd line). I know that
'..' stands for parent directory what does '...' mean?

 

In perldoc of readdir() I am unable to follow below line. Can anyone explain
me the below line with example?

 

'If you're planning to filetest the return values out of a readdir
<http://perldoc.perl.org/functions/readdir.html> , you'd better prepend the
directory in question. Otherwise, because we didn't chdir
<http://perldoc.perl.org/functions/chdir.html>  there, it would have been
testing the wrong file.'

 

Thanks & Regards,

Sanket Vaidya

 


_____________________________________________________________________ 

This e-mail message may contain proprietary, confidential or legally privileged 
information for the sole use of the person or entity to whom this message was 
originally addressed. Any review, e-transmission dissemination or other use of 
or taking of any action in reliance upon this information by persons or 
entities other than the intended recipient is prohibited. If you have received 
this e-mail in error kindly delete this e-mail from your records. If it appears 
that this mail has been forwarded to you without proper authority, please 
notify us immediately at netad...@patni.com and delete this mail.
_____________________________________________________________________

Reply via email to