in reply to Is a file XML?
Open up the file and look for the declaration line.
$isxml = 0; while(<HANDLE>) { if($_ =~ /.*xml\s+version/i) { $isxml = 1; last; } } if($isxml) { # xml file stuff here } else { # not xml file stuff here }
This was written in a hurry and not tested (I need to run to a meeting ;)) but it should be enough to start with
Update: Rereading this post-meeting I see I missed the question altogether.... davorg gave the right answer ;)
$japh->{'Caillte'} = $me;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Is a file XML?
by davorg (Chancellor) on Sep 25, 2001 at 15:34 UTC |