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

Re: Perl Regex

by smls (Friar)
on Oct 10, 2013 at 11:35 UTC ( [id://1057723]=note: print w/replies, xml ) Need Help??


in reply to Perl Regex

I don't see what's wrong with the code you gave in the OP - it does output the three values you said you want:

The seven split is 200 The eight split is 300 The nine split is 444

If you want them in separate named variables, just do this inside your loop:

my $val1 = $7; my $val2 = $8; my $val3 = $9;

Update: Ah, it seems you wanted all 10 values of each record, and wondered why your output only showed the first 9. hdb has already found the reason: A missing backslash before the last pipe in the regex.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-25 07:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found