Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Matching over multiple lines in a scalar

by chromatic (Archbishop)
on Oct 27, 2002 at 22:48 UTC ( #208394=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Data::Dumper;
    my $info = do { local $/; <DATA> };
    ...
        $lines{$1} = $2;
    }
    print Dumper (\%lines);
    
  2. or download this
    my %lines = $info =~ /(\d+): (.+?)$/gm;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (1)
As of 2021-05-08 05:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (96 votes). Check out past polls.

    Notices?