while(<IN>)
{
    $firstword=$middleword;
    $middleword=$lastword;
    $lastword=$_;
    if ($firstword eq "Installation" && $lastword eq "Installation")
    {
        print "FOUND $middleword\n";
    }

Would that work?

Regards,`
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com



----- Original Message -----
From: "Allison Ogle" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 27, 2002 9:13 AM
Subject: Search for a word in between words


>
>
> To give you even more information, in my datafile, the word that I am
> searching for is 'marked' by the word in the line before it.  For example,
> the lines in my datafile look like..
>
> line 1
> line 2
> line 2
> Installation
> example
> Installation
> line 4
> line 5
> line 6
>
> and all I want is the word in between the words Installation.  Because I
> don't know what the word in between the words Installation will be, I'm
not
> actually searching for the word Installation but for the word in the next
> line after Installation.  Does that make sense?  Any ideas?
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to