Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: can't use unpack or split??

by seaver (Pilgrim)
on Jun 07, 2004 at 20:22 UTC ( [id://362096]=note: print w/replies, xml ) Need Help??


in reply to Re: can't use unpack or split??
in thread can't use unpack or split??

Limbic~Region

I'm afraid I dont understand how the '.*' will capture a space within the second column, seeing it's followed by a '\s+'?

Another thing, that had just occured to me:

The letter present in the third column is identical to one of the letters(first or second) in the second column.

So if I checked that, I'd know if a space turned up in the wrong place, because the letters don't check out right?

Sam

Replies are listed 'Best First'.
Re^3: can't use unpack or split??
by Limbic~Region (Chancellor) on Jun 07, 2004 at 20:26 UTC
    seaver,
    I'm afraid I dont understand how the '.*' will capture a space within the second column, seeing it's followed by a '\s+'?

    So you ran the code, saw that it works, but didn't know why.

    I would suggest perldoc perlre or perhaps The Owl Book. It works because I have anchored it at both ends ^ and $ and forced the other spaces where appropriate. Since general use of .* is frowned upon, I have modified it after reading your more constraining information here.

    Cheers - L~R

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-19 21:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found