my @array = map { s/oldpage/newpage/g; $_ } ; print reverse @array; __DATA__ title oldpage oldpage htm tab aaaaa