> > Hello

Howdy

> > 
> > This should be very straightforward:
> > 
> > print "Enter 5 of your favorite foods: ";
> > $favorites = ( <STDIN> );

[snip]

> > 
> > The desired output would be:
> > 
> > food1 food2 food3 food4 food5
> > 
> > food1
> > food2
> > food3
> > food4
> > food5
> > 
> > 
> > Can someone steer me in the right direction?

 my @favs = split(/\s+/, $fav);
 print @favs;
 for(@favs) { print "-$_-\n"; }

HTH

Dmuey

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to