On Tue, Jul 15, 2014 at 11:16 AM, MAX PUX wrote:
> I expected this output:
> website
> ForeignAssistance
> ForeignAssistanceRow
> AssistanceType
> RecipientCountry
> ProgramName
>
> but the output was:
>
> └website┐
>
> └ForeignAssistance┐
>
> └ForeignAssistanceRow┐
>
$/[0] is a Match object, wh
Hi
You can force correct stringification method by explicit convaersion
say $/[0].Str
or using print which uses it implicitly
print $/[0] ~ "\n"
bbkr
On 15 Jul 2014, at 17:16, MAX PUX wrote:
> I've written this code:
> use v6;
>
> my $file =3D open "us_foreign_assistance.xml";
>
> for $
I've written this code:
use v6;
my $file =3D open "us_foreign_assistance.xml";
for $file.lines -> $line {
extract($line);
}
sub extract($line) {
if $line ~~ m/ \< (\w+) \> / {
say $/[0];
}
}
The xml file contains:
< ?xml version=3D"1.0" encoding=3D"UTF-8" standalone=3D"yes"?