#!/usr/local/bin/perl -w use strict; my $string1 = "Hallo Welt!"; my $string2 = "Hallo"; my @array1 = qw (1 2 3 4 5); my @array2 = qw (2); my $array_feld = "1"; my $result; $result = ($array1[$array_feld] =~ m/^$array2[$array_feld]/); if ($result) { print ("\n\nIt works!!\n\n"); print ("The Result is: $result\n\n"); }