Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Create file listing in Perl (Read 2977 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Create file listing in Perl
06.11.07 at 14:14:49
 
Create file listing in Perl
 
The following perl program generates a file listing.
 
$strPath = "/var/user/mydir";
opendir( $ptrDir, $strPath);
 
while  ($strFile = readdir($ptrDir))  
{
    print $strFile . "\n";
}
closedir($ptrDir);
 
 
Enter the above code in a plain ttext file and save it as a .pl file (e.g. filelist.pl).
To run the program type at the command prompt: perl filelist.pl
Back to top
 
« Last Edit: 06.11.07 at 14:25:15 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1