use strict;
use warnings;
# demonstration of error message
my $test = "";
my $abc = "abc";
if ($abc =~ /xyz/) { # <- LINE 7
print "nothing\n";
}
#elsif ($abc =~ /[$test]/) {
if ($abc =~ /[$test]/) { # <- LINE 11
print "passed 1st condition\n";
}
####
Unmatched [ before HERE mark in regex m/[ << HERE ]/ at D:\try3.pl line 11.
####
use strict;
use warnings;
# demonstration of error message
my $test = "";
my $abc = "abc";
if ($abc =~ /xyz/) { # <- LINE 7
print "nothing\n";
}
elsif ($abc =~ /[$test]/) {
#if ($abc =~ /[$test]/) { # <- LINE 11
print "passed 1st condition\n";
}
####
Unmatched [ before HERE mark in regex m/[ << HERE ]/ at D:\try3.pl line 7.