Hi All, I have a test code in progress and I haven't figured out how to get 'next' to work the way I want.
next if $Line.contains( "TASK type" ); works, but if $Line.contains( "TASK type" ) { next; does not. What am I missing? Many thanks, -T yes I know I still have some things to fix on it. <code> #!/usr/bin/env perl6 use strict; my @Data = '<TASK type="D">Mission D', ' <NAME type="P">Sol Wheat</NAME>', ' <NAME type="P">Ted Moon</NAME>', '</TASK>'; # for @Data -> $Line { say "$Line"; } for @Data -> $Line { # next if $Line.contains( "TASK type" ); if $Line.contains( "TASK type" ) { next; my $Name = $Line; if $Name.contains( "NAME type" ) { $Name ~~ s/.*?\>//; $Name ~~ s/\<.*//; say $Name; } } } </code> -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Computers are like air conditioners. They malfunction when you open windows ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~