Not to get further bogged down in this issue that's really secondary to your question, but you still need quotes; you just didn't go quite far enough and asked the shell to interpret $ENV instead of passing it to perl.
codeacrobat's
one-liner is better anyway.