Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: extracting data from a file

by frozenwithjoy (Priest)
on Dec 14, 2012 at 07:17 UTC ( #1008786=note: print w/replies, xml ) Need Help??


in reply to extracting data from a file

You could just capture stretches of non-quote characters that are between quotes:
#!/usr/bin/env perl use strict; use warnings; use feature 'say'; my $string = q("qazwsx" "edcrfv" "tgbyhn"); my @array = $string =~ /"([^"]*)"/g; say $_ for @array; __END__ qazwsx edcrfv tgbyhn

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1008786]
help
Chatterbox?
and a log crumbles through the grate...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2016-12-06 06:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (101 votes). Check out past polls.