Can any one explain ARGV,gets.chomp() command line arguments same.rbfile

Discussion in 'Ruby' started by Durga B., Nov 29, 2010.

  1. Durga B.

    Durga B. Guest

    In cmdline.rb file:

    puts ARGV[0]
    puts "Enter a no "
    val =gets.chomp.to_i()

    Come to command prompt
    Go to taht file path>cmdline.rb prasad
    cmdline.rb:15:in`gets`:no such file or directory-prasad(Errorno::ENOENT)
    from cmdline.rb

    --
    Posted via http://www.ruby-forum.com/.
     
    Durga B., Nov 29, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    20
    Views:
    752
    Keith Thompson
    Jul 26, 2007
  2. Replies:
    6
    Views:
    135
    Guillaume Benny
    Mar 29, 2006
  3. Replies:
    1
    Views:
    140
    Felix Geerinckx
    Mar 22, 2005
  4. martin
    Replies:
    3
    Views:
    201
    Joe Smith
    Apr 15, 2006
  5. Niall Macpherson

    ARGV[] unable to pick up command line arguments

    Niall Macpherson, May 19, 2008, in forum: Perl Misc
    Replies:
    7
    Views:
    202
    J├╝rgen Exner
    May 20, 2008
Loading...

Share This Page