in reply to Re: Stripping off the first line of file help!
in thread Stripping off the first line of file help!

OK, I can do this but how would I use XML::XPATH after slurping the file into a variable? Here is my situation: Its been treated as text, I rather treat the file like XML for validation. Any suggestions?
my @memberstocheck = ('12345', '88766', '887766', '009888', '111233', +'99877'); # Check XML file. my @xml = $zip->membersMatching( '.*\.XML' ); foreach (@xml) { # Slurp file my $contents = $_->contents(); open my $contents_fh, '<', \$contents or die "Can't open scalar filehandle: $!"; my $first_line = <$contents_fh>; while (<$contents_fh>) { chomp; if(/<accnumber>(.*?)<\/accnumber>/gi) { my $acc = $1; foreach (@memberstocheck) { if (/^($acc)/g) { print "$acc - ".$_."\n"; } } } } }