Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: testing files for valid content

by graff (Chancellor)
on Apr 24, 2009 at 03:19 UTC ( [id://759734]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -lne '$n=tr/,//;$h{$n}++;END{print "$h{$_} rows have $_ commas" f
    +or (keys %h)}' some_file.csv
    
  2. or download this
        split(",")
    
  3. or download this
        split( /,/, $_, -1 );
    
  4. or download this
       @array = split( /,/, "field1,field2,,field4,field5,,," );
    
  5. or download this
       ( 'field1', 'field2', undef, 'field4', 'field5' );
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (1)
As of 2024-04-19 00:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found