in reply to Re^2: combining PDFs
in thread combining PDFs

Not sure I understand. Have you hardcoded those file names in the system call?  I would guess that you get the input file names from somewhere (listing directory contents, some config file, user input...).  Otherwise, how would the program work if there's a new date stamp...

So why not simply dynamically create the output file name according to the date stamp found in the input file?  For example:

my $in1 = "exhibit1_29JUN2010.pdf"; my $in2 = "exhibit2.pdf"; my ($date) = $in1 =~ /_([^_]+)\.pdf$/; # extract date my $out = "exhibits_$date.pdf"; # create output file name system "pdftk /home/Memos/$in1 /home/Memos/$in2 cat output /home/Memos +/$out";

Or maybe

my $dir = "/home/Memos"; my $in1 = <$dir/exhibit1_*.pdf>; my $in2 = "$dir/exhibit2.pdf"; my ($date) = $in1 =~ /_([^_]+)\.pdf$/; my $out = "$dir/exhibits_$date.pdf"; system "pdftk", $in1, $in2, "cat", "output", $out;