in reply to Extracting field from a line

In a more general case, your line may contain quoted commas, or escaped commas, causing undesired or unexpected field splitting.

I'd suggest using Text::CSV , in order to create more robust code.

     "Income tax returns are the most imaginative fiction being written today." -- Herman Wouk