Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: extracting data from a file

by frozenwithjoy (Curate)
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


Comment on Re: extracting data from a file
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (10)
As of 2015-07-08 03:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls