Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Parsing a file with multiple delimeters

by ptum (Priest)
on Jan 06, 2006 at 21:59 UTC ( [id://521652]=note: print w/replies, xml ) Need Help??


in reply to Parsing a file with multiple delimeters

It sounds to me as though split() might do the trick for you. How 'bout this:

my @tokens = split /\|/,$t; # I can't remember if | needs to be esc +aped or not

Now $tokens[0] contains 'DsGccProxy.dll', $tokens[2] contains 'YES', and $tokens[1] contains all the executable names. If you want each of them, you could do a split on $tokens[1] using /,/ as the delimiter.

Hope that gets you started. :)


No good deed goes unpunished. -- (attributed to) Oscar Wilde

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-03-29 12:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found