From: Dominik Honnef Date: 2009-02-03T04:17:54+09:00 Subject: Re: Noob question: while or for loop within a list --+KJYzRxRHjYqLGl5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On [Tue, 03.02.2009 04:14], Darin Ginther wrote: > Essentially I want to do the following: > list =3D "url1, irl2, url3, url4, url5" > while [ list ]; #in other words, we loop 5 times or =3D # things in list > do > #A Bunch of Stuff 1 > #A Bunch of Stuff 2 > done >=20 [snipp] > Suggestions / Best practices? list.split(", ").each do |url| # do fancy stuff with our url end --=20 Dominik Honnef dominikho@gmx.net --+KJYzRxRHjYqLGl5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkmHRtYACgkQePZ2jI1LDtfGtQCgoNlmoRSMLkpJ491btbIxMQ7a SMwAoORT9neExi1MgMw+xmx8S5AHvZ3W =k0J3 -----END PGP SIGNATURE----- --+KJYzRxRHjYqLGl5--