in reply to Re^3: Avoid memory error while extracting text block
in thread Avoid memory error while extracting text block

Common usage has conditioned us to believe that the test condition of the while loop is what's inside the parentheses. In this case, the negative match operator is part of it as well. The body of the while loop is the 1.

1 while ($_ = <$FH_IN) !~ /START TOKEN;

is the equivalent of:

while (<$FH_IN> !~ /START TOKEN/) { 1 }

You can get Perl to show you how it interprets a statement like that using the B::Deparse module.

$: perl -MO=Deparse -e '1 while ($_ = <>) !~ /START TOKEN/' '???' until ($_ = <ARGV>) =~ /START TOKEN/; -e syntax OK

Perl turns the while with a negative match operator into an until with the positive operator.

But God demonstrates His own love toward us, in that while we were yet sinners, Christ died for us. Romans 5:8 (NASB)