manipulate csv module

Ask a Question related to PERL Modules, Design and Development.

  1. #1

    Default manipulate csv module

    Hello All,

    I have a .csv file which has 3 columns of data. Is there a
    module that i can use that will allow me to manipulate this file.
    Like remove some data from 1 column and add it to another, add
    and remove columns etc...

    Thanks,

    onlineviewer Guest

  2. Similar Questions and Discussions

    1. manipulate images
      Hi, I need to get some text from a database and put this text on an image. Its to generate an incomingticket for a theater. Can anyone help me?...
    2. Manipulate a Tree
      Hello, Is there any way to manipulate a Tree component via the GUI in Flash 2004 Professional. What I mean by manipulate is a user selects a node...
    3. manipulate Win2K IP/subnet/DNS?
      Hello again... Jenda pointed me to the Win32::FileOp module (thanks!) to manipulate drives; now I wonder if it's possible to manipulate the local...
    4. Manipulate text like MS WordArt?
      Grump wrote: To achieve the look of what I think are called WordArt Shapes in Word you would need to use what full fledged vector apps call...
    5. manipulate mail header
      Hi! Its me again. Sorry for the last post - it was quite clumsy. In fact, it wasn't really what I need. I have a mail and I want to fake the...
  3. #2

    Default Re: manipulate csv module

    onlineviewer wrote:
    > Hello All,
    >
    > I have a .csv file which has 3 columns of data. Is there a
    > module that i can use that will allow me to manipulate this file.
    > Like remove some data from 1 column and add it to another, add
    > and remove columns etc...
    >
    > Thanks,
    Googling "perl text csv" returns a link to:

    Module: Text::CSV

    Description:
    Text::CSV provides facilities for the composition and decomposition
    of
    comma-separated values. An instance of the Text::CSV class can
    combine
    fields into a CSV string and parse a CSV string into fields.
    <snip>

    Might be a good place to start.

    Bob Lanteigne Guest

  4. #3

    Default Re: manipulate csv module

    Bob Lanteigne wrote:
    > onlineviewer wrote:
    >
    >>Hello All,
    >>
    >>I have a .csv file which has 3 columns of data. Is there a
    >>module that i can use that will allow me to manipulate this file.
    >>Like remove some data from 1 column and add it to another, add
    >>and remove columns etc...
    >>
    >>Thanks,
    >
    >
    > Googling "perl text csv" returns a link to:
    >
    > Module: Text::CSV
    >
    > Description:
    > Text::CSV provides facilities for the composition and decomposition
    > of
    > comma-separated values. An instance of the Text::CSV class can
    > combine
    > fields into a CSV string and parse a CSV string into fields.
    > <snip>
    >
    > Might be a good place to start.
    >
    Searching [url]http://search.cpan.org/[/url] for CSV also works.

    Tom Wyant
    harryfmudd [AT] comcast [DOT] net Guest

  5. #4

    Default Re: manipulate csv module

    Thanks for the response. I found Tie::Handle::CSV which seems to be ok.
    I am trying to
    iterate over the Title column so i can perform an action on each piece
    of data.
    I am trying a while loop but not working out too well. Any
    suggestions.?
    Thanks,

    $csv_fh = Tie::Handle::CSV->new( 'file01.csv', openmode => '+<' );

    print +( scalar <$csv_fh> )->{'Title'}, "\n";

    This is not working:
    while ($csv_fh->{'Title'}){
    print "bla bla\n";
    }




    Bob Lanteigne wrote:
    > onlineviewer wrote:
    > > Hello All,
    > >
    > > I have a .csv file which has 3 columns of data. Is there a
    > > module that i can use that will allow me to manipulate this file.
    > > Like remove some data from 1 column and add it to another, add
    > > and remove columns etc...
    > >
    > > Thanks,
    >
    > Googling "perl text csv" returns a link to:
    >
    > Module: Text::CSV
    >
    > Description:
    > Text::CSV provides facilities for the composition and decomposition
    > of
    > comma-separated values. An instance of the Text::CSV class can
    > combine
    > fields into a CSV string and parse a CSV string into fields.
    > <snip>
    >
    > Might be a good place to start.
    onlineviewer Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139