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;
In reply to Re: Is a file XML?
by Caillte
in thread Is a file XML?
by ajt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |