On Thu, Aug 24, 2000 at 05:26:36PM -0600, Tom Christiansen wrote:
> >I thought this problem would've been neatly solved by my proposed:
> 
> >    print <<<"FOO" =~ s/^ {8}//;
> >        Attention criminal slacker, we have yet
> >        to receive payment for our legal services.
> 
> >                    Love and kisses
> 
> >    FOO
> 
> 
> The result of substituting the leading 8 blanks (which might be tabs!)
> from the very front just once is probably 1, which isn't a very interesting
> thing to print. :-(

Oh, well, there should have been a /g there.  And the regex may not work for
everyone (it would work wonderfully for me).  If you like:

    print <<<"EOF" =~ s/^\s*\| ?//g;
        | Attention criminal slacker, we have yet
        | to receive payment for our legal services.
        |
        |     Love and kisses
        |
    EOF


Basically, it's shorthand for the current syntax:

    $message = <<"    EOF" =~ s/^\s*\| ?//g;
        | Attention criminal slacker, we have yet
        | to receive payment for our legal services.
        |
        |     Love and kisses
        |
    EOF

    print $message;


But any inconsistencies or errors in my examples should not detract from the
general idea.


Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

Reply via email to