I'm attempting to write a program that will determine if a 7-character string is a palindrome or not, and it keeps throwing me this error. I'm not exactly sure why it's doing it or how to fix it.

```
#!/usr/bin/perl
use Modern::Perl;
use strict;
use warnings;

print "Enter a 7 character string: ";

chomp (my $pal = <>);

my $size = length($pal);

if ($size == 7) {
        $pal[0] = my $a;   # Here's where it starts throwing errors
        $pal[1] = my $b;
        $pal[2] = my $c;
        $pal[3] = my $d;
        $pal[4] = my $e;
        $pal[5] = my $f; 
        $pal[6] = my $g;   # All the way to down here
        if ($a eq $g) && ($b eq $f) && ($c eq $e) {
            print "PALINDROME\n";
        }
        else {
            print "NOT A PALINDROME\n";
        }
 }
 else {
     print "Your string must contain 7 characters!\n";
 }

```

I am not allowed to use the reverse function in this code. Also, I'm pretty new to Perl, so please keep things basic for me.