in reply to taking csv and seprating unknown number of columns

Don't use:

use Text::CSV;

in a subroutine. It might be called several (or many) times uselessly. Usually, use statements should be at file top level.

Replies are listed 'Best First'.
Re^2: taking csv and seprating unknown number of columns
by Anonymous Monk on Jul 24, 2013 at 02:40 UTC

    It might be called several (or many) times uselessly.

    Perhaps you'd like to read perldoc -f use and revise your answer

      You are right, 'use' is perfomed at compile time, and I know it and knew it, and I don't know why I wrote that. I must have been sleeping. Still, it is better practice in my view to have all the use statements at the top of the file, that's what I really meant to say, but I got carried away somehow.