ok, i tried looking for this and have not found anything 
basicly i have a web site seach script, and i want this script to find a word and return the whole sentence that word is in like so.
ok, how do i pull $search_return out of $text?
i'm so lost, thanks so much for your time!
basicly i have a web site seach script, and i want this script to find a word and return the whole sentence that word is in like so.
Code:
my $search_word = 'another';
my $text = "this is a sentance. this is another sentance.";
if ($text =~ m/$search_word /i){
$search_return = 'this is another sentance.';
}
ok, how do i pull $search_return out of $text?
i'm so lost, thanks so much for your time!