in reply to Help XML Search and replace

Your input to XMLin is incorrect :

either use a filename :
my $file = 'C:\Program Files\Apache Group\Apache2\htdocs\legastronome\ +XML\Admin\coffee.xml'; my $xml = XMLin($file);


or an string :

open F, '< C:\Program Files\Apache Group\Apache2\htdocs\legastronome\X +ML\Admin\coffee.xml' or die "Problem"; @data = <F>; my $xml = XMLin(join '', @data);


--
zejames

Replies are listed 'Best First'.
Re^2: Help XML Search and replace
by Aristotle (Chancellor) on Sep 28, 2004 at 12:49 UTC

    He's already doing that.

    #!/usr/bin/perl use strict; use warnings; sub XMLin { print "[$_[0]]\n"; } my @data = ('C:\Program Files\Apache Group\Apache2\htdocs\legastronome +\XML\Admin\coffee.xml'); my $xml = XMLin((join'', @data)); __END__ [C:\Program Files\Apache Group\Apache2\htdocs\legastronome\XML\Admin\c +offee.xml]

    His code at that point is indeed confused, but that's not the reason for his problem.

    Makeshifts last the longest.