Hi,

Am Mittwoch, 30. Dez 2009, 10:10:05 +0900 schrieb Seebs:
> On 2009-12-30, I=F1aki Baz Castillo <ibc / aliax.net> wrote:
> > How could I avoid the "\" scaping so the text appears verbatim?
> > Thanks a lot.
>=20
> If any part of the listed modifier for the here document is quoted,
> the here document acts like single quotes:
>=20
> cat <<-'EOF'
>         foo\bar$baz
> EOF
> =3D>
> foo\bar$baz

`cat' is a shell command. I suppose you meant something like

  mystr =3D <<-'EOT'
    hello
    EOT

> (Note that the stripping of whitespace from the '-' still takes effect.)

The `-' just means that an indented "EOT" will close the here
document; without it the "EOT" has to start in column 1. No
whitespace will be stripped inside the string.

Bertram


--=20
Bertram Scharpf
Stuttgart, Deutschland/Germany
*
Discover String#notempty? at <http://raa.ruby-lang.org/project/step>.