How Reading Directory Works?

How do you following two lines of code work? mvfs_drive_letter contains M

opendir (DIR, "$mvfs_drive_letter:");
$file = readdir DIR;

Thanks.

LVL 1
naseeamAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Adam314Connect With a Mentor Commented:
The first line creates a handle (named DIR) to the directory.
The second line reads the first entry (file or directory) in that directory.  
0
 
TintinCommented:
perldoc -f readdir
perldoc -f opendir
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.