Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: CSV tab-delimited not space-delimited

by Tux (Canon)
on Jun 25, 2010 at 10:16 UTC ( #846506=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $dbh = DBI->connect ("dbi:CSV:", undef, undef, {
        f_ext                => ".csv/r",
        csv_sep_char         => "\t",
    ...
        }) or die $DBI::errstr;
    # due to <c>f_ext</c> there is no need to specify the filename!
    my $sth = $dbh->prepare ("select * from file");
    
  2. or download this
           allow_whitespace
               When this option is set to true, whitespace (TAB's and SPAC
    +E's)
    ...
               either TAB or SPACE is one of the three major characters
               "sep_char", "quote_char", or "escape_char" it will not be
               considered whitespace.
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2022-12-04 15:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?