1 2 3 4 5 6 7 8
#!/usr/bin/perl use strict; use warnings; my $beg = 'Test'; my $such = 'test'; my $gross_klein = 0; if ($beg =~ m/$such/(!$gross_klein ? 'i' : '')) {print "ja\n"}
1 2 3 4 5 6 7 8 9
#!/usr/bin/perl use strict; use warnings; my $beg = 'Test'; my $such = 'test'; my $gross_klein = 0; my $modifier = (!$gross_klein ? 'i' : ''); if ($beg =~ m/(?$modifier)$such/) {print "ja\n"}