Perl Guru, please help - Sajha Mobile
SAJHA MOBILE
Perl Guru, please help
Posts 2 · Viewed 4061 · Go to Last Post
Hydrogen Sulphide
· Snapshot 0
Like · Likedby · 0
 How do I use a loop to find $query value in an array and display a message "present" if the value is present?
for example, I have 
@array= (1..10)
I need to check if it has $query= "6" using loop.
Thank you in advance!
dolphin
· Snapshot 84
Like · Liked by · 0
foreach ( @array ) { print "present" if $_ == 6; }
Please log in to reply to this post

You can also log in using your Facebook
View in Desktop
What people are reading
You might like these other discussions...
· Posts 9 · Viewed 12662 · Likes 1
· Posts 7 · Viewed 4102 · Likes 1
· Posts 1 · Viewed 1121
· Posts 1 · Viewed 1139
· Posts 1 · Viewed 1027
· Posts 1 · Viewed 1118
· Posts 1 · Viewed 1082
· Posts 21 · Viewed 10252 · Likes 1
· Posts 3 · Viewed 2671
· Posts 5 · Viewed 7865 · Likes 1



Your Banner Here
Travel Partners
Travel House Nepal