#!perl -w # "-w" turns on all sorts of warnings about probable errors.
$dir = "r:\\\\40K\\";
sub listdirectory {
local($dir);
local(@lines);
local($subdir);
local($lvl_counter);
local($list_length);
$dir = $_[0];
if(opendir (DIR, $dir))
{
@lines = readdir (DIR);
closedir (DIR);
$lvl_counter = 2;
$list_length = ( scalar @lines );
while ($lvl_counter < $list_length)
{
$subdir = $dir."\\".$lines[$lvl_counter];
if(opendir (SUBDIR, $subdir))
{
closedir (SUBDIR);
&listdirectory($subdir);
}
else
{
print "$subdir\n";
}
$lvl_counter++;
}
}
}
&listdirectory($dir);
####
read_import_test.pl
r:\\40K\\A400332S1_05.pdf
r:\\40K\\A400332S2_05.pdf
r:\\40K\\A400332S3_05.pdf
r:\\40K\\A400396S1_07.pdf
r:\\40K\\A400396S2_07.pdf
####
C:\Perl\Weir_scripts>perl -c import_prod.pl Ambiguous use of eval => resolved to "eval" => at ..\lib/re.pm line 81. Perl 5.006 required--this is only version 5.00307, stopped at ..\lib/File/Basena me.pm line 142. BEGIN failed--compilation aborted at ..\lib/File/Basename.pm line 142. BEGIN failed--compilation aborted at import_prod.pl line 3.
C:\Perl\Weir_scripts>perl -v This is perl, version 5.003_07
####
C:\Perl\Weir_scripts>set IMAN
IMAN_BIN=c:\ugs\tceng912\bin
IMAN_DATA=c:\ugs\imandata\testdata
IMAN_DB_CONNECT=infodba:tbwiabd@test
IMAN_DISABLE_FLASH=true
IMAN_HELP_FILE=c:\ugs\tceng912\web\htdocsimanhelp\imanhelp.hlp
IMAN_INCLUDE=c:\ugs\tceng912\include IMAN_INIT_DIR=C:\DOCUME~1\ADMINI~1.WIL\LOCALS~1\Temp\1
IMAN_LANGUAGE=c:\ugs\tceng912\lang IMAN_LIBRARY=c:\ugs\tceng912\lib IMAN_LOCALIZATION_DIR=en
IMAN_LOG=c:\ugs\imandata\testdata\log_wilmsntch5_test
IMAN_MSG_ROOT=c:\ugs\tceng912\lang\textserver
IMAN_PRINTER=lpr.exe
IMAN_ROOT=c:\ugs\tceng912
IMAN_SYS_UID_DIR=c:\ugs\tceng912\lang\vt100 IMAN_TMP_DIR=C:\DOCUME~1\ADMINI~1.WIL\LOCALS~1\Temp\1
IMAN_TRACEBACK=ON
IMAN_UG_DEFAULT_PART=c:\ugs\imandata\testdata\blank_english.prt
IMAN_USER_TOOLS=c:\ugs\tceng912\local\tools IMAN_XML_ENCODING=ISO-8859-1
C:\Perl\Weir_scripts>set ORACLE
ORACLE_HOME=c:\ugs\tceng912
ORACLE_SERVER=wilmsntch5
ORACLE_SID=test
####
C:\UGS\tceng912\bin>dir perl.exe
Volume in drive C has no label.
Volume Serial Number is 0CF2-5BB1
Directory of C:\UGS\tceng912\bin
07/02/1998 03:32 PM 87,040 perl.exe
1 File(s) 87,040 bytes 0 Dir(s) 12,339,765,248 bytes free
C:\UGS\tceng912\bin>perl -v This is perl, version 5.003_07