This is an example module for Drupal which uses file upload and Batch API to accept a CSV file. It generates a batch and runs it; the batch iterates through each line of the CSV (except the first) and does ... nothing. The basic idea is that if you're writing a CSV importer for Drupal, maybe you can start here and save a bunch of time.