From: see@... (Douglas Wells) Date: 2007-01-26T06:25:09+09:00 Subject: Problem with stripping leading whitespace in here documents I'm writing a number of test cases. I would like the input data to behave like a file, and I would like to include that data within the test file (in order to reduce the proliferation of files and eliminate the necessity of tracking an additional, separate file for each test case). Similar mechanisms would include BASIC's DATA statements, or Perl's DATA filehandle. I don't know of an analogue in ruby. Any suggestions? Instead I am using Bourne shell-type here-documents. But, I am encountering a problem. The Bourne shell supports the concept of stripping leading white space, and Ruby seems to support the same notion (from .../doc/ruby18/ruby-man/syntax.html): "If the - [is] placed before the delimiter, then all leading whitespcae [sic] characters (tabs or spaces) are stripped from input lines and the line containing [the] delimiter. This allows here-documents within scripts to be indented in a natural fashion." which is the same syntax as the Bourne shell. But, if I run the following script: # Start of script: input1 = <