Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Unindenting here-docs (Re: My day with Damian Conway)

by tye (Cardinal)
on Jan 11, 2002 at 21:09 UTC ( #138052=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        print unindent( <<"    END" );
            Usage: $0 [flags] [args]
            Gropples the snarflog.
    ...
                       wide  Minimize alphabet size.
            Do not use on UTF8 files.
        END
    
  2. or download this
    sub unindent { s/^\s*\S//gm }
    
        print unindent( <<"    END" );
    ...
            .           wide  Minimize alphabet size.
            .Do not use on UTF8 files.
        END
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2015-07-03 09:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (51 votes), past polls