If multiple arguments are passed to perl\'s system function then the shell expansion will not work:
# COMMAND $ perl -e \'my $s=\"*\"; system(\"echo\", \"$s\" )\
You can use open to pipe directly to mailx, without your content being interpreted by the shell:
open
open( my $mail, "|-", "mailx", "-s", $email_subject, $recipient ); say $mail $email_message; close $mail;
More details can be found in open section of perlipc.