You appear to be trying to use shell pattern matching, as supported by Korn shell and Bash inside
[[...]]. Perl does not support that type of pattern matching, it uses Regular Expressions.
In addition, == in Perl is used for arithmetic comparisons, eq is used for textual comparisons, and =~ is used for matches.
So:
if ($export =~ /^q.*y$|^Y/)
etc.