I assume you mean the fail2ban jail?
The Wordpress fail2ban filter should (by default) not act on anything other than post requests to a file named wp-login.php. That being said, it depends on what your Perl script does. If it's action matches the fail2ban filter it is possible that the jail gets triggerd.
Post your fail2ban Wordpress rule and filter and an excerpt that contains access entries of the perl script from the access log if you want me to take a more in dept look.