It does not work. Here's error I get: Can't declare ref-to-glob cast in "my" at sms_lib.pl line 256, near ");"
-----Original Message----- From: Derek Wueppelmann [mailto:[EMAIL PROTECTED]] Sent: 27. studeni 2001 19:52 To: [EMAIL PROTECTED] Subject: RE: Writing XML to a file On Tue, 27 Nov 2001, Igor Vrdoljak wrote: > sub PrintSTOUT { > my ($doc) = @_; > XML::Xerces::DOMParse::unformat ($doc); > XML::Xerces::DOMParse::format ($doc); > XML::Xerces::DOMParse::print (\*STDOUT, $doc); > } > > sub PrintFile { > my ($doc) = @_; > my $string = $doc->serialize(); > open FP, $XML_TEST_FILE; > print FP $string; > > } > > Now, PrintSTOUT works, but PrintFile does not. > I would be grateful if you helped... Why don't you do someting like this inside of PrintFile instead... sub PrintFile { my ($doc) = @_; my (*FP); open FP, $XML_TEST_FILE; XML::Xerces::DOMParse::print(\*FP, $doc); } Would that not have the same effect? At least the desired effect you are looking for? -- 0/ Derek Wueppelmann [EMAIL PROTECTED] /D Canada NewsWire Ltd. http://www.newswire.ca / ) Work: (416) 863-2107 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
