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

Re^2: Best method of munging CSV data - using Text::CSV::Simple?

by billie_t (Sexton)
on Feb 08, 2006 at 06:15 UTC ( [id://528734]=note: print w/replies, xml ) Need Help??


in reply to Re: Best method of munging CSV data - using Text::CSV::Simple?
in thread Best method of munging CSV data - using Text::CSV::Simple?

Apologies for the typo with my list of fields - I mistakenly pasted from old code - I've got the correct (1,2,3) in my new stuff, although I was pulling my hair out there for a while.

That is helpful, thank you. So, the parts of the line are line[0], line[1], line[2] when they're divvied up by Text::CSV::Simple. You've dumped line[0] into an array to break up its components, that's great.

So I can manipulate line[1] and line[2] to grab the other parts I need. In that loop, I should be able to output something line-by-line like (pseudocode) "@parts[0]    line[1]@line[2]", which is effectively "SMTP_ADDRESS    USER@SERVER". That's fantastic, I was imagining all kinds of wierd structures in my head, not a simple and understandable one.

  • Comment on Re^2: Best method of munging CSV data - using Text::CSV::Simple?

Replies are listed 'Best First'.
Re^3: Best method of munging CSV data - using Text::CSV::Simple?
by Cody Pendant (Prior) on Feb 08, 2006 at 06:20 UTC
    I was imagining all kinds of wierd structures in my head, not a simple and understandable one.

    That's why they invented Data::Dumper.

    I'd be lost without it.

    Just add use Data::Dumper; and do print Dumper(\$something); and it makes things a lot easier. That's how I figured out what you data was doing.



    ($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
    =~y~b-v~a-z~s; print

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-25 18:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found