output:#!/usr/bin/perl use strict; use warnings; use HTML::TokeParser::Simple; my $str = q{<tag ref=1>Start<tag ref=2>and more</tag>and end</tag>}; my $p = HTML::TokeParser::Simple->new(\$str) or die "can't parse str: $!"; my @array; while (my $t = $p->get_token){ push @array, $t->as_is; } print "$_\n" for @array;
---------- Capture Output ---------- > "C:\Perl\bin\perl.exe" _new.pl <tag ref=1> Start <tag ref=2> and more </tag> and end </tag> > Terminated with exit code 0.
In reply to Re: Split tags and words nicely
by wfsp
in thread Split tags and words nicely
by bwgoudey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |