in reply to Urgent help !!!!

padawan_linuxero,

It's very unclear to me what's your problem. Is it merely to create filenames?

use strict; use warnings; use DateTime; my $dt = DateTime::->now(); my (undef, $weekNo) = $dt->week(); for my $row (<DATA>) { my @array = split(q{,}, $row); print 'sem'.$weekNo.$array[0].'data.csv'; } __DATA__ 1458,juan armando 2500,Armando Guajardo 3500,AAA 4500,padawan $ perl -wl 645533.pl sem421458data.csv sem422500data.csv sem423500data.csv sem424500data.csv
Update: Removed intarweb addresses as suggested by Fletch.

Update 2: This is by no means an advice to abandon the initial set of modules (as suggested by jZed), but merely an attempt to understand to expected output.

--
Andreas

Replies are listed 'Best First'.
Re^2: Urgent help !!!!
by jZed (Prior) on Oct 17, 2007 at 20:09 UTC
    So in other words, you suggest that the OP abandon a module that properly handles CSV and replace it with a split that ignores embedded commas and newlines and that the OP abandon a known interface (SQL) for one they should roll on their own for each new problem? Even if I didn't have a vested interest, I'd consider that bad advice. What you show is fine for one-off stuff but fails badly in the general case.