in reply to Is is possible to read in XML file with out use any module?
It's easy enough to read it in. This will slurp it in as a big string:
my $xml_text = do { local(@ARGV, $/) = 'myfile.xml'; <> };
But actually using the content is a different matter. XML is pretty complex to parse, which is why people generally use a pre-written XML module. Parsing a limited subset of XML is generally doable using regular expressions, but I'd still consider this a last resort.
Any particular reason why you're not using modules? See Top Seven (Bad) Reasons Not To Use Modules.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Is is possible to read in XML file with out use any module?
by depthFirst (Initiate) on May 12, 2012 at 22:02 UTC | |
by Anonymous Monk on May 13, 2012 at 01:57 UTC |