From: Heesob Park Date: 2009-03-08T18:03:42+09:00 Subject: Re: I code my first ruby script, and it got problem! Hi, 2009/3/8 Power One : > Hello folks! > > I'm totally new to Ruby.  For practice, I'm trying to code a very simple > script that checks user's input for directory name, and then check to > see if directory is exist, if not create it, and then clean it up by > delete the created directory. > > Unfortunately, the script didn't create correct directory as it always > attach a question-mark right behind a directory name that a user > entered.  For ex:  if user enter directory /home/disney/land, instead of > creating directory "land", the script creates a directory "land?".  How > can I solve this problem?  You can see my script at > http://pastie.org/410753. You actually created directory not "land?" but "land\n" The line # 5 of your code if @dirname = gets should be if @dirname = gets.chomp Regards, Park Heesob