-----Messaggio originale-----
Da: Reese Chappuis [mailto:c0dege3k / gmail.com] 
Inviato: domenica 13 novembre 2011 01:21
A: ruby-talk ML
Oggetto: Using gets and split

I'm working on a challenge that tells me that the input is given at the
beginning via STDIN. Thus, these are the first few lines of my program:

all_input = gets
all_input = all_input.to_s.split("\n")

The input is going to be split by separate lines, and I want to put each
into a separate element in an array. Now, this code works in irb (modified
to look more like str = soandso, str = str.to_s.split.....), but when I run
it in my program, everything gets thrown into one element in the array. Can
someone tell me why?

--
Reese Chappuis

 
 
 --
 Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f
 
 Sponsor:
 Capodanno a Riccione, Pacchetto Relax: Mezza Pensione + bagno turco + solarium + massaggio. Wifi e parcheggio gratis. 2 giorni euro 199 a persona
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=11979&d=29-12