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.
|