Sure you can, this is Perl you're talking about :-)
To give you a more specific answer we would need some more info, like:
Is the files on a local server or out there on the web?
Do the format of the hidden tags always have a known format?
Can they be multi-line?