$ cat test_shebang.pl #!/usr/bin/env perl print $^V; $ ./test_shebang.pl v5.36.0 $ perlbrew switch perl-5.33.5 $ perl -v | head -2 | tail -1 This is perl 5, version 33, subversion 5 (v5.33.5) built for cygwin-thread-multi $ ./test_shebang.pl v5.33.5