in reply to read error in XML parsers, Windows XP Service only

Try to read the XML by simple open my $in, '<', $path. Can you open it? Any chance you use relative paths and the working directory is different? Any chance the file is on a mapped network drive?

Replies are listed 'Best First'.
Re^2: read error in XML parsers, Windows XP Service only
by soliplaya (Beadle) on Apr 20, 2008 at 23:55 UTC
    Ok, thanks guys. Your various messages made me go back and look really hard at what I was doing before parsing the file, and I found that indeed, when started as a service, the path to the file-to-parse was incorrect.

    Basically, when starting as a service, the startup directory is not the same as when starting in a console. My program "knows that", and does a chdir() in that case. But I ended up pre-pending the current directory path twice to my filename, and trying to parse "C:/XYZC:/XYZ/filename.ini" when running as a service.

    Entirely my fault, but your comments were very useful in helping convince me that I was not the victim of some obscure Perl/XML-Parser/WinXP scheme.

    Many thanks.