There's a couple of approaches you could take. The problem is, the string you're passing to perl is single quoted, which means it won't be interpolated. That's normally good news, but in this case you're passing through $i literally, and there's no perl variable with that name.
One approach is to export it an then read it in via the %ENV hash:
export VALUE=3;
perl -e 'print $ENV{'VALUE'},"\n";'
Otherwise, you 'just' need to interpolate the string first:
VALUE=3
perl -e "print $VALUE;"
Although in your example - I'd be suggesting don't bother using shell at all, and rewrite:
#!/usr/bin/perl
my @array = qw (1 2 3 4 5 6);
foreach my $element ( @array ) {
my $text = "some text";
$text =~ s|(some).*(text)|$1$element$2|;
print $text,"\n";
}