> my $cookie = $cookiepage->header('Set-Cookie'); > $cookie = substr($cookie, 0, index($cookie, ";")); <------ LINE 232 If $cookie is null, you'd get the warning from index(). How about: my $cookie = $cookiepage->header('Set-Cookie') || '';