in reply to How to print data between tags from file sequentially?
Bearing in mind that you asked to print only the data between > < sequentially, here's one way to do it:
#!/usr/bin/perl use strict;use warnings; while ( <> ) { print "$1\n" if /<Answer type="string">(.+?)<\/Answer>/; }
|
|---|