Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: Re: Re: Re: Re: multi line matching problem

by Roger (Parson)
on Dec 16, 2003 at 04:08 UTC ( #314960=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $text = 'hello
       this is a multiline
    ...
    $text =~ s/([^\S\n]+|\n)/$1 eq "\n" ?
                             print "New line\n" :
                             print "Whitespaces\n"; $1/gemi;
    
  2. or download this
    New line
    Whitespaces
    ...
    Whitespaces
    New line
    Whitespaces
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2018-08-18 14:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (185 votes). Check out past polls.

    Notices?