That’s easy: look at both!
Python, despite its very peculiar use of indentation as a lexical property of the source-code (“white space is meaningful!”), is a very powerful list-processing language with many inspirations and similarities to LISP ... without those Little Irritating Silly Parentheses. Perl, on the other hand, has a marvelous way with text files. Both are workhorses, and general-purpose. Both can be used to do the others’s work, but both have their own unique comparative strengths, and since both are equally at-hand . . .
In reality, you’ll find yourself using several different scripting languages, and production systems quite-commonly contain an oddly-fitting hodgepodge of them. Therefore, I would suggest that you split your attention between these two. Maybe you’ll trend toward a favorite, or maybe not. I never drew favorites ... This breadth of knowledge will surely help you when you peel-the-onion of a new system and look at how they built it and say . . . :-O !!