Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re: Remove leading spaces (left justify)

by Anonymous Monk
on May 19, 2003 at 04:31 UTC ( [id://259061]=note: print w/replies, xml ) Need Help??


in reply to Re: Remove leading spaces (left justify)
in thread Remove leading spaces (left justify)

Presumably, if the terminator is prefixed with 1 or more tabs, then that same number of tabs will be removed from the other lines (if they are present), and if it has 2 spaces and a tab, the 2 spaces and a tab will be removed from the other lines if present?

This won't do the right thing if the whitespace is mixed and variable, but it might do 'the right thing' more often than not.

From what I've read around the Monastery, you'd be forgiven that HEREDOCS were dangerous, unuseful animals that should have been depricated long ago.

It's nice to see an old favorite of mine reinventing itself. I wonder if this change will satisfy its detractors?

  • Comment on Re: Re: Remove leading spaces (left justify)

Replies are listed 'Best First'.
Re: Re: Re: Remove leading spaces (left justify)
by TheDamian (Vicar) on May 19, 2003 at 06:04 UTC
    Yep, the leading whitespace will, by default, be matched exactly. If perl6 detects heterogeneous whitespace, it will detab from the first heterogeneous character, assuming 8-spaced hard tabs extending from the margin.

    And, yes, there will be a pragma to change that default behaviour in various ways (e.g. to 4-space tabs, full-detabbing, no-detabbing, etc. etc.).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://259061]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-25 05:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found