Loading ...
Sorry, an error occurred while loading the content.

RE: [PBML] Parsing CSV File

Expand Messages
  • Smith, Eric - WPAFB/YSXOI
    ... yes, this is probably simpler for this case than the DBI solution I posted ... However, if you want to do updates to the file, DBI might be easier - else
    Message 1 of 4 , Jan 31, 2001
    • 0 Attachment
      > as long as the values can never contain a "," on their own, and you don't
      > care about quoting/escaping stuff, it's pretty simple:
      >
      > while(<FILE>) {
      > ($email,$uid,$fname,$ldname) = split /,/, $_;
      > # do something with these here
      > }

      yes, this is probably simpler for this case than the DBI solution I posted
      :-).

      However, if you want to do updates to the file, DBI might be easier - else
      you read in the file and rewrite the modified file. *May* have to use
      something like a hash of hashes for this case.

      Of course, if you plan to later convert the CSV to a full-functioning DB, a
      DBI script would require only simple one or two line changes.

      - Eric
      >
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.