develooper Front page | perl.perl6.language | Postings from August 2001

Qouting and white-space etc..

Thread Next
August 15, 2001 04:36
Qouting and white-space etc..
Message ID:

I was wondering if there was some way when using qouting to specify triming
of white space or other type of charachters we may need ... say like TT or
may be example..

my $javascripCode = qq{
    |    function blah()

    |        if ( ) ....
    |    };

    |<-inner spaces/tabs preserved

and I want to have some syntax so I can specify that First and Last "\n" be
removed, plus the whole script body goes one tab to left... i.e. removed
first X \t (the number of tabs/spaces removed depends on the position of
<script>, u gottcha)
Yes I know I can use regex...

Similar like :
<snip Perl6-notes>
Here docs
. RFC 111: Here doc Terminators
. RFC 162: Here doc contents
. Whitespace no longer significant before here doc identifier
. Whitespace no longer significant before or after here doc
terminator (nor are semicolons)
. Identifier must be quoted
. Here doc contents left-shifted according to whitespace before
.... example....

but inner space/tabs are preserved..

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About