On Oct 4, 2006, at 6:49 PM, David Turnbull wrote:
What about using a .rb file and the here operator for the data and
loading or requiring it? Like...
fh = <<EOF
america
american
april
...
EOF
This will likely add parsing overhead to the script: if you're a
performance freak (or would just like a better way), take a tip from
how perl hackers do this and use the __END__ method, described here:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/9555
Yes, you can treat DATA just like a filehandle.
--
Erik Hollensbe
[EMAIL PROTECTED]
_______________________________________________
PDXRuby mailing list
[email protected]
IRC: #pdx.rb on irc.freenode.net
http://lists.pdxruby.org/mailman/listinfo/pdxruby