# Assuming your outside hash is named %h, print $h{main_data}[1]{AMOUNT} . "\n";