Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by vane

  1. vane

    How to find out if a value exists in array?

    Do you mean that it's faster to iterate a hash than an array? Why so?
  2. vane

    How to find out if a value exists in array?

    Well that's a pretty piece of code... I will definitely use that one. Thanks, Neil
  3. vane

    How to find out if a value exists in array?

    thanks, but actually I only wanted to know if given value exists in an array. I would still have to iterate %found hash to find out if a given scalar exists, right? Which is no problem of course, but I have always thought that a long piece of code only for that purpose... (In perl standards...
  4. vane

    How to find out if a value exists in array?

    I find myself doing something like this quite often: foreach(@array) { if ($_ == $value) { $found=1; last; } } if ($found) { # $value found in @array... } Is there a shorter/more elegant way to do this in perl?

Part and Inventory Search

Back
Top