You mean:
while ($wholefile =~ /<TEXT>(.*?)<\/TEXT>/sig)
{
   # do your stuff
}

Craig Cardimon wrote:
I have this logic to follow:

while(<FILE>)
{
     if(/START/ .. /END/)
    {
        # process line
    }
}

I found this logic in an article (http://www.perl.com/pub/a/2004/06/18/variables.html) on Perl's Special Variables at Perl.com.

I want to try modifying the logic to process a file that has been slurped into a string variable, like so:

while($wholefile)
{
     if(<TEXT>/ .. /<\/TEXT>/)
    {
        # process line
    }
}

I think I'm being stupid here (it's close to the end of the business day), because the Perl Command Line Interpreter has scolded my various attempts. Any suggestions?


-- Craig
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to