Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.java.programmer Subject: Re: multi-line Strings Date: Sun, 16 Dec 2012 14:07:25 +0100 Lines: 52 Message-ID: References: <7f36342c-2331-4484-874b-4a0f8953f160@googlegroups.com> <50c61150$0$293$14726298@news.sunsite.dk> <50c6413a$0$293$14726298@news.sunsite.dk> <50c6598d$0$290$14726298@news.sunsite.dk> <50c69625$0$293$14726298@news.sunsite.dk> <50cbeec3$0$291$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 2d9vmxTmWy2QqoFs0LUaGQevDBX9nDWTo5MISoafoBrAIkZAIn/1NfknUPIZ3H04w= Cancel-Lock: sha1:O+q0ZpyHe3KvaaoFWt65N6tRvyc= User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: Xref: csiph.com comp.lang.java.programmer:20374 On 16.12.2012 09:56, BGB wrote: > On 12/15/2012 5:34 PM, Robert Klemme wrote: >> On 15.12.2012 18:22, Peter J. Holzer wrote: >>> But for all various string syntaxes that Perl supports, it's still >>> missing a sane multiline string syntax. >> >> Does it? >> >> $ perl x.pl >> a line >> another line >> yet another line >> one more line >> $ cat x.pl >> >> $str=<> a line >> another line >> yet another line >> one more line >> MULTI >> >> print($str); >> > > I had before imagined the possibility of something like: > #< > IOW: > str = #< line 1 > line 2 > line 3 > EOF; > > but, never really added this, as heredoc syntax is kind of ugly IMO... I don't really see the difference - or the improvement. You just added a hash and a semi colon. Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/