custome gls method in perl was broken