I've just been caught out when using someone else's API in conjunction with the default variable $_

foreach (@rps_server_details) {
    @server_data = ();
    @server_data = split(/,/);
    @$esp_hosts = ();
    $filters{server_name} = $server_data[0];
    print "--->$_<--\n";
    $esp_hosts = $esp->get_hosts(fields => $fields, %filters) || die "$@";
    print "--->$_<--\n";

The output for this is:

--->igrid8873.someone.com,app_10<--
Use of uninitialized value in concatenation (.) or string at ./rps_inv_lookup.pl line 120.
---><--

Specifying my own loop variable instead of relying on $_ fixes the problem.

Am I just being naive by using $_ in conjunction with an API someone else has written? Or is this a bug in that API module?

Edit
Report