Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Regex Doubt

by Athanasius (Chancellor)
on Nov 12, 2012 at 09:01 UTC ( #1003383=note: print w/replies, xml ) Need Help??

in reply to Regex Doubt

Perhaps you’re looking for something along these lines?

#! perl use strict; use warnings; use Data::Dump; my @records; while (my $line = <DATA>) { chomp(my @r = split / - /, $line); push @records, [ @r ]; } dd @records; __DATA__ Part Time - Weekend Receptionist - Barton le Clay - Barton-le-Clay (ne +ar Luton) Part-Time Weekend Day Veterinary Nurse - Milton Keynes Receptionist - Barton-le-Clay (near Luton) Full Time - Veterinary Nurse - Glasgow Referral - Glasgow


18:58 >perl ( [ "Part Time", "Weekend Receptionist", "Barton le Clay", "Barton-le-Clay (near Luton)", ], ["Part-Time Weekend Day Veterinary Nurse", "Milton Keynes"], ["Receptionist", "Barton-le-Clay (near Luton)"], ["Full Time", "Veterinary Nurse", "Glasgow Referral", "Glasgow"], ) 18:59 >

Hope that helps,

Athanasius <°(((><contra mundum

Replies are listed 'Best First'.
Re^2: Regex Doubt
by Anonymous Monk on Nov 12, 2012 at 09:09 UTC

    Thanks Athanasius. :)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1003383]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2017-07-20 17:07 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (309 votes). Check out past polls.