while (<>) { s/[\r\n]//g; $data[$.] = $_; } for ( $i = $.; $i > 0; $i-- ) { printf( "%s\n", $data[$i] ); } exit;