#! /usr/bin/perl use strict; use warnings; my $text = '"a;bc";def;ghi'; my $such = 'bc";def'; #oder #my $such = 'def;ghi'; if (";$text;" =~ /\;$such\;/i) { print "Treffer;\n"; }