develooper Front page | perl.perl5.porters | Postings from May 2003

Why aren't regex heredocs allowed?

Thread Next
From:
Brent Dax
Date:
May 2, 2003 20:03
Subject:
Why aren't regex heredocs allowed?
Message ID:
003301c31120$635227a0$6501a8c0@deepblue
	C:\>perl -
	print 'foo' =~ <</END/;
	foo
	END
	^Z
	Can't find string terminator "" anywhere before EOF at - line 1.
	
	C:\>perl -v
	
	This is perl, v5.6.1 built for MSWin32-x86-multi-thread
	(with 1 registered patch, see perl -V for more detail)
	
	Copyright 1987-2001, Larry Wall
	
	Binary build 633 provided by ActiveState Corp.
http://www.ActiveState.com
	Built 21:33:05 Jun 17 2002

Why aren't regex heredocs allowed?  They would seem to be a convenient
way to match against a large pattern.

--Brent Dax <brentdax@cpan.org>
@roles=map {"Parrot $_"} qw(embedding regexen Configure)

>How do you "test" this 'God' to "prove" it is who it says it is?
"If you're God, you know exactly what it would take to convince me. Do
that."
    --Marc Fleury on alt.atheism


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About