Advertisement
Guest User

Untitled

a guest
Oct 28th, 2013
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. #!/usr/bin/ruby
  2.  
  3. hosts=['qa1', 'qa2', 'qa3']
  4. ports=[111, 222, 333]
  5.  
  6. hosts.each_with_index {
  7. |host, index|
  8. puts "#{host} #{index}"
  9. puts ports["#{index}"]
  10. }
  11.  
  12. i want the output to be like
  13. qa1 111
  14. qa2 222
  15. qa3 333
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement