Solved

How Reading Directory Works?

Posted on 2007-11-15
2
145 Views
Last Modified: 2010-03-05
How do you following two lines of code work? mvfs_drive_letter contains M

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

Thanks.

0
Comment
Question by:naseeam
2 Comments
 
LVL 39

Accepted Solution

by:
Adam314 earned 500 total points
ID: 20291111
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
 
LVL 48

Expert Comment

by:Tintin
ID: 20291892
perldoc -f readdir
perldoc -f opendir
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
perl search and replace 6 168
Exchange 2010 Transport Rule Regex 28 107
Regex rule to match two different url 5 71
How to translate this 2-line while loop into C from Perl? 8 93
Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question