in reply to the god awful =~

I don't know if you're doing what you intended here...
You are looping over @vname, setting $line to the current element and chomping it, then you are using the manual loop number $j to get that same element of @vname. You might want to replace the $vname[$j] with $line and remove the line $j++. Otherwise you are repeating things.
And the regex should probably be $line=~/"$request"/i.

Updated: Yeah for my $j (0..$#vname) was the other construct I would have recommended if I'd noticed that $email[$j] there, hmmm...don't know why I missed seeing that. Oh well.

And the quotes might or might not be supposed to be there, probably not though, I should have guessed he didn't know regex that well when I saw the 'i' in the wrong place.

Replies are listed 'Best First'.
Re: Re: the god awful =~
by extremely (Priest) on Dec 03, 2000 at 14:22 UTC
    He's not repeating things, he has another array matched with the @vname one, @email. Of course he'd be better off with either a better data structure (like a list of lists) or using this:
    for (my $j=0; $j<@vname; $j++) { #stuff here }

    Worse, he likely needs to take the double quotes out of his regex too, as others pointed out...

    --
    $you = new YOU;
    honk() if $you->love(perl)