Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: split at '- - -'

by tobyink (Abbot)
on May 17, 2013 at 13:54 UTC ( #1033978=note: print w/replies, xml ) Need Help??


in reply to Re: split at '- - -'
in thread split at '- - -'

undef isn't the only useful thing you can assign to $/...

use strict; use Data::Dumper; my @f; { local $/ = "\n---\n"; chomp(@f = <DATA>); } print Dumper(\@f); exit; __END__ line1 --- line2 --- line3 ---
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1033978]
help
Chatterbox?
[davies]: I've just "approved" using syscalls in perl through inline c for at least the third time, but it still appears to me as unapproved. Is this just me?
[LanX]: erix: other side of the pond
[LanX]: davies: same problem
[Corion]: It had been approved as a Perl Monks Discussion. It should now be approvable into SoPW
[choroba]: Approved
[LanX]: hmm aproval doesn't stick after move? Or was it a race condition

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (11)
As of 2017-01-16 15:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (151 votes). Check out past polls.