redss has asked for the wisdom of the Perl Monks concerning the following question:
#what is the simplest way to do this? I have a function called "found" but I think the grep function might be able to be used for it but I don't know how...
@array = (1,2); $number = 3; # HOW TO DO THIS? check to see if $number is in @array print "found\n" if found($number, @array );
|
---|
Back to
Seekers of Perl Wisdom