LJZN

每天更新Rails练习项目到Github~

» Home
» Category
» About Me
» Github

笨方法学Ruby第十五天

26 Jun 2016 » LRTHW
filename = ARGV.first

txt = open(filename)

puts "Here's your file #{filename}:"
print txt.read

txt.close

print "Type the filename again: "
file_again = $stdin.gets.chomp

txt_again = open(file_again)

print txt_again.read

txt_again.close

Related Posts