Saturday, August 09, 2008

basic ruby script

I have been playing with Ruby, thought id post a basic hello world style script....


/code

#!/usr/bin/ruby


print "what do you want to print on screen:  "
str = gets
exit if str.nil? or str.empty?
str.chomp!

print "\n"
print str


/end code


-Nexus6



0 comments:

View blog authority