in reply to Re: loop control
in thread loop control
What this is doing is parsing xml. Note that the leading "<" has already been stripped by the split function. The contents of $tmp here are:$out = "<?xml version="1.0" encoding="utf-8"?>"; @tmp = split /</, $out; foreach(@tmp) { if (substr($_, 0, 1) eq "?") { next; } elsif (substr($_, 0, 1) eq "!") { &more_code; } }
If I test whether the condition passes or not by simply printing something like "it passed", then I see this.. so I know it's passing the condition.?xml version="1.0" encoding="utf-8"?>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: loop control
by hotshot (Prior) on May 22, 2002 at 15:08 UTC | |
|
Re: Re: Re: loop control
by dsheroh (Monsignor) on May 22, 2002 at 15:09 UTC | |
by Galen (Beadle) on May 22, 2002 at 17:34 UTC |