Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 studying the Monastery: (3)
As of 2014-10-25 10:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (142 votes), past polls