I think your view of Python 2 not having a future is a bit dark. Python 2 is installed on more machines than Python 3 I presume and it's not going anywhere fast. The main thing that Python 2 has going against it is that Guido declared it dead. Python 3 uptake is slow and I'm not sure that it will get better.
Perl 5 is not really being slowly phased out. Perl 6 is just starting, but Perl 5 has a battle-tested environment and a vibrant community and has sustained maintenance of the libraries. For example, CGI has just been spun out of Perl so it can be maintained independent of Perl itself. Of course, /usr/bin/perl is Perl 5 and will be for at least five years to come. This year is the first year supposed to see a major Perl 6 release and we can judge from that onwards as to the uptake of Perl 6.
So, I wouldn't dismiss using Python 2 but I consider Perl 5 a good choice obviously. If you're looking for a concise, fun language to program in, Perl 6 might also be interesting. Currently, there is a major lack of libraries for Perl 6, but support for binding to third party C libraries through FFI is surprisingly good.