Vineet Pande wrote:
> Hi

Hello,

> In the following code
> 
> ****************************************************************
> #!/usr/bin/perl
> use warnings;
> use strict;
> 
> my $found = 0;
> $_ = "Nobody wants to hurt you... 'cept, I do hurt people sometimes,
> Case.";
> 
> my $sought = "people";
> 
> foreach my $word (split) {
> if ($word eq $sought) {
> $found = 1;
> last;
> }
> }
> if ($found) {
> print "ok";
> }
> ~
> ~
> I don't understand the usage my $word (split).....how is $_ and $word
> linked?

They aren't linked.  What made you think that they were?


John

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to