I am creating an output file, and I want to use the date parameter passed in
as part of the output file name.
This is how I name my output file:

1. Assign the date param to ARGV -> $active_date = $ARGV[0];
2. $outputfile = "NEW_CUSTOMERS_after_$active_date";

When I run the task I get the following error:

Can't write to file: No such file or directory   at
/xps_uat1/express/atai/loc/server/bin/new_customers_since.pl line 71.

Below is the section that is referenced:

if ($ARGV[0] ne '') {
$fetch_New_customers->execute($active_date) || die "Can't execute file
handle: $DBI::errstr\n";
while (@raw = $fetch_New_customers->fetchrow)
{       
        $node_name      = $raw[0];
        $created_date   = $raw[1];
        $active_date    = $raw[2];
        open (FILE,">>$outputfile$active_date") || die "Can't write to file:
$!  ";  <---LINE 71
        write (FILE); 
        
}       


Is there a better way to incorporate a date parameter in the output file
name.
Thanks,
Kim



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to