#!/usr/bin/perl use strict; use warnings; my @array = (1,0,"foo",0,"foo"); for(my $i = 0; $i <= $#array; $i++) { if ($array[$i] eq 'foo') { print "\"foo\" -String gefunden bei:"; print " Position " . $i . "\n"; } }