Immigration in Lima has never asked me for proof on onward travel even when I say I'm staying 5-6 months. But I was once denied boarding by Copa in Puerto Rico for only having a one way ticket to LIM. They said if I had a bus/train/boat ticket leaving Peru it would be enough but I ended up having to buy a refundable ticket at the airport and cancelling it the next day.