I am going to discuss about how to read a file in Ruby
Initially we need a text file,
lets' start
fname = ARGV.first #assigns file name dynamically
text= open(fname)
print text.read #reads the file
Initially we need a text file,
lets' start
fname = ARGV.first #assigns file name dynamically
text= open(fname)
print text.read #reads the file
