Remove unused variable in perl scripts