What is the opendir() function in Perl?
opendir function is used for reading the content of a particular folder.
Method 1:
opendir(DIRHANDLE,"/some director/path") or die "Can't open directory";
Method 2:
opendir DIRHANDLE, '/some diretory/path' or die "Can't open directory";
Method 3:
@contents = glob ('/some diretory/path*');
Method 4:
@contents = </some diretory/path*>;
kaavannan perl blogspot
Labels: kaavannan perl blogspot, opendir in python, perl dir, perl grep readdir, perl open file, perl opendir error handling, perl read files in directory, perl stat, readdir
0 Comments:
Post a Comment
Note: only a member of this blog may post a comment.
<< Home