in reply to Foreach loop
If you are going to use a for loop, I'd use something along the lines of ...
Having said that, the OP has the whiff of homeworkmy $keys = "5 10 14 16 17 20 25 26 38 1 42 + 47 54"; my $substr = '1'; print "\nExist" if $_ eq $substr for split /\s+/, $keys;
A user level that continues to overstate my experience :-))
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Foreach loop
by marinersk (Priest) on Sep 27, 2013 at 23:56 UTC |
In Section
Seekers of Perl Wisdom