--- Michael Campbell <michael_s_campbell> wrote: > (I think...)
> Having a brain-fade today. Is there a simple ruby equivalent to
> perl's qw() construct? I want, in order to save typing, to convert a
> list of non-quoted words like so:
> foo bar baz...
> into an array of quoted strings: ["foo", "bar", "baz", ...]
> Perl does this by: list = qw(foo bar baz ...);
> this works... list = "foo bar baz".scan(/\w+/)
> as does: list = "foo bar baz".split(/ /)
list = %q(foo bar baz)
> but both seem wieldy and ...