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

Re: Re: How can I remove 0 from first line and empty space from the start of the following line and join them

by krusty (Hermit)
on Oct 16, 2002 at 02:34 UTC ( #205615=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while (<DATA>) {
        $_ .= <DATA>;
        s/^0\s*(.*)\n\s+(.*\n)/$1 $2/s;
        print;
    }
    
  2. or download this
    {  local $/ = undef;
       $_ = <DATA>;
        s/^0\s*(.*)\n\s+(.*\n)/$1 $2/s;
        print;
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2014-11-26 09:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (165 votes), past polls