B
Barry Millman
Hi:
I am using Perl 5 (I believe both machines are using ActivePERL 5) on
two machines with the same data files. One machine is Win 2000 the
other is Win XP. The files are MS Word 2000 documents e-mailed
(manually) from the Win 2000 machine to the XP machine.
The program searches the MS Word Files (both created with MS Word 2000)
for the word HYPERLINK. The format for the HYPERLINK that I am
searching for in the document is:
HYPERLINK "mydoc.doc"
(I checked this on the XP machine in Notepad and it is OK.)
PROBLEM: The program works on the Windows 2000 machine, but does not
find the files on the Win Xp machine.
The code that is not finding the text on the Win XP machine (same as
the Win 2000 machine which does find the test)is:
----------- start actual code segment --------------------
while (/HYPERLINK(\s+.{1,80}?\.doc)/gim) # the "g" causes multiple
matches
{
$fndxx = $1;
$fndxx =~ s/\"//; # remove leading quote
$fndxx =~ s/\s+//; # remove leading spaces
$dir="C:\\IGINproducts\\UserDocuments\\";
$fullname = ($dir . $fndxx);
$date_string = "Cannot Find";
if (-e $fullname) { $date_string = ctime(stat($dir .
$fndxx)->mtime); } #last update date of that file
print(OUTFILE $fndxx,",",$date_string,", in: ",basename($file),
"\n") ;
$matches += 1; # count matches
} #end while HYPERLINK
----------- end actual code segment --------------------
The output for a found HYPERLINK should look like this (it does on the
Win 2000 machine):
mydoc.doc,(date of last update), in: otherdoc.doc
On Win XP, the program cannot even find the word HYPERLINK (if I modify
the code to just search for that). The directories are valid, I can
have the program print a list of all files as it processes them.
If I try this with a test program (the string to test is in the program
itself ) it works fine on the XP machine.
There are no encryption issues, nor any file or directory problems.
I would really appreciate any comments or suggestions about what I am
doing wrong.
Thanks,
Barry Millman
I am using Perl 5 (I believe both machines are using ActivePERL 5) on
two machines with the same data files. One machine is Win 2000 the
other is Win XP. The files are MS Word 2000 documents e-mailed
(manually) from the Win 2000 machine to the XP machine.
The program searches the MS Word Files (both created with MS Word 2000)
for the word HYPERLINK. The format for the HYPERLINK that I am
searching for in the document is:
HYPERLINK "mydoc.doc"
(I checked this on the XP machine in Notepad and it is OK.)
PROBLEM: The program works on the Windows 2000 machine, but does not
find the files on the Win Xp machine.
The code that is not finding the text on the Win XP machine (same as
the Win 2000 machine which does find the test)is:
----------- start actual code segment --------------------
while (/HYPERLINK(\s+.{1,80}?\.doc)/gim) # the "g" causes multiple
matches
{
$fndxx = $1;
$fndxx =~ s/\"//; # remove leading quote
$fndxx =~ s/\s+//; # remove leading spaces
$dir="C:\\IGINproducts\\UserDocuments\\";
$fullname = ($dir . $fndxx);
$date_string = "Cannot Find";
if (-e $fullname) { $date_string = ctime(stat($dir .
$fndxx)->mtime); } #last update date of that file
print(OUTFILE $fndxx,",",$date_string,", in: ",basename($file),
"\n") ;
$matches += 1; # count matches
} #end while HYPERLINK
----------- end actual code segment --------------------
The output for a found HYPERLINK should look like this (it does on the
Win 2000 machine):
mydoc.doc,(date of last update), in: otherdoc.doc
On Win XP, the program cannot even find the word HYPERLINK (if I modify
the code to just search for that). The directories are valid, I can
have the program print a list of all files as it processes them.
If I try this with a test program (the string to test is in the program
itself ) it works fine on the XP machine.
There are no encryption issues, nor any file or directory problems.
I would really appreciate any comments or suggestions about what I am
doing wrong.
Thanks,
Barry Millman