Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: problem with array

by ChOas (Curate)
on Aug 20, 2008 at 06:29 UTC ( #705425=note: print w/replies, xml ) Need Help??

in reply to problem with array

Personally I'm pretty fond of modifying the input record seperator:
local $/="</end>\n"; my @group = map {[/<ref id="([^"]+)">/g]} <DATA>; print "New Group: @$_\n" for @group; __END__ <ref id="ref1"> <ref id="ref2"> <ref id="ref3"> </end> <ref id="ref4"> <ref id="ref5"> </end> <ref id="ref6"> <ref id="ref7"> <ref id="ref8"> </end>

New Group: ref1 ref2 ref3
New Group: ref4 ref5
New Group: ref6 ref7 ref8

(edit: Ah, so is GrandFather, read right past his response, 'ooops')


print "profeth still\n" if /bird|devil/;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://705425]
[marto]: demonstrably yes, since you claim to want a safe space, your definition for which seems to be a place where you can name call, make things up or otherwise post without being challenged
[usemodperl]: no that's not it at all, meant safe for perl people, to not be hounded by weirdos obsessed with things like... whitespace :-)
[choroba]: I'm definitely not obsessed with whitespace, I rate myself among Perl people, and I haven't noticed any hounding
[marto]: "no it's not that"...."weirdos "...
[marto]: List EXE_FILES installed by CPAN so a couple of people suggest that your code looks obfuscated. I'd have to ageree, from the perspective of those who can't follow all of that one liner, it doesn't read well
Veltro is a weirdo, obsessed with whitespace
[marto]: to use the word "obsession" when so few people have said so little about it is grasping at staws
marto wishes tye was around, he's so much better at this sort of thing
usemodperl likes tye!
usemodperl tye  too

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2018-06-24 15:58 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.