On Sat, 13 Oct 2001 16:30:08 +0200, raptor wrote: >I was looking at TPJ one-liners and saw this : > >#32 A trick for indenting here strings > >($definition = <<'FINIS') =~ s/^\s+//gm; > The five varieties of camelids are the familliar > camel, his friends the llama and the alpaca, and > the rather less well-known guanaco and vicuna. >FINIS > >Courtesy of The Perl Cookbook > >It is very cool if we have a way to set this RegEx so that it executes in >compile time....
I can remember that an even smarter version of this was discussed in an RFC -- I don't remember which -- so it's not unlikely that it will be part of Perl6. Besides, if this is a fixed string, you can rearrange your source code so that it executes only once. It doesn't really matter then if this is at compile time, or at run time. -- Bart.