if I want column 1 entries to go in one array , second column entry to another and so on . How can i define my array
The easiest solution is to have an array or arrays, AoA for short. These are 2D arrays. See:
To understand AoA's you'll need to learn about references:
You can then store each field in
$AoA[row number][column number]
It's unlikely you'll need to ask the user how many columns there are.
Update: doh! Cross posted with marto and hippo, though luckily I think together our posts explain different levels and aspects of the solution.
Text::CSV is definitely the way to go!