From: Love U Ruby Date: 2013-02-14T20:26:14+09:00 Subject: Re: Confusion with Ruby command line options From the [doc](http://web.njit.edu/all_topics/Prog_Lang_Docs/html/ruby/options.html) ***-0digit =>*** *specifies the input record separator ($/) as an octal number. If no digits given, the null character is the separator. Other switches may follow the digits. -00 turns Ruby into paragraph mode. -0777 makes Ruby read whole file at once as a single string, since there is no legal character with that value.* My bad! Couldn't digest it at all. So let's started to play with it. C:\>ruby -0777 -e 'a= gets; puts a ' Hi, This is Ram. Could you help me here? ^Z #~~~> pressed ENTER here after CTRL+Z and got the output as below- Hi, This is Ram. Could you help me here? C:\>ruby #~~~> return the prompt C:\>ruby -000 -e 'a= gets; puts a ' Hi, This is Ram. Could you help me here? ^Z #~~~> pressed ENTER here after CTRL+Z and got the output as below- Hi, This is Ram. Could you help me here? C:\>ruby #~~~> return the prompt C:\>ruby -00 -e 'a= gets; puts a ' Hi, This is Ram. Could you help me here? #~~~> pressed ENTER #~~~> pressed ENTER here and got the output as below- Hi, This is Ram. Could you help me here? C:\>ruby #~~~> return the prompt Can I set such `octal` or `$/` to as below ? carraige return (\r) tab (\t) If so, Can I have one example for each to see their behaviours? I also tried to print the value of `"$/"` and nothing printed. So how should I see that? C:\>ruby -00 -e 'a= gets; puts a ;puts "here is: #{$/}"' hi hi here is: C:\>ruby -0777 -e 'a= gets; puts a ;puts "here is: #{$/}"' Hey! Arjun Are you going school? ^Z Hey! Arjun Are you going school? here is: C:\> -- Posted via http://www.ruby-forum.com/.