Assign value to ARGV : ARGV « Development « Ruby






Assign value to ARGV


#!/usr/bin/env ruby

ARGV << "myFile.txt"
print while gets

 








Related examples in the same category

1.Ruby places parameters that are appended to the command line into a special array called ARGV.
2.The two filenames are both command line arguments
3.Get command line input through ARGV