Index: /trunk/ippScripts/scripts/register_exp.pl
===================================================================
--- /trunk/ippScripts/scripts/register_exp.pl	(revision 20118)
+++ /trunk/ippScripts/scripts/register_exp.pl	(revision 20119)
@@ -17,4 +17,5 @@
 use Storable qw( freeze thaw );
 use File::Basename qw( basename );
+use File::Temp qw( tempfile );                   # tools to construct temp files
 use IPC::Cmd 0.36 qw( can_run run );
 use PS::IPP::Metadata::Config;
@@ -26,5 +27,5 @@
 my $ipprc = PS::IPP::Config->new();
 
-my ($cache, $exp_id, $exp_tag, $dbname, $verbose, $no_update, $no_op, $logfile);
+my ($cache, $exp_id, $exp_tag, $dbname, $verbose, $no_update, $no_op, $save_temps, $logfile);
 GetOptions(
     'caches'        => \$cache,
@@ -35,4 +36,5 @@
     'no-update'     => \$no_update,
     'no-op'         => \$no_op,
+    'save-temps'    => \$save_temps, # Save temporary files?
     'logfile=s'     => \$logfile,
 ) or pod2usage( 2 );
@@ -52,6 +54,6 @@
 # Look for commands we need
 my $missing_tools;
-my $regtool = can_run('regtool')
-    or (warn "can't find regtool" and $missing_tools = 1);
+my $regtool = can_run('regtool') or (warn "can't find regtool" and $missing_tools = 1);
+my $ppStatsFromMetadata = can_run('ppStatsFromMetadata') or (warn "Can't find ppStatsFromMetadata" and $missing_tools = 1);
 
 if ($missing_tools) {
@@ -65,4 +67,6 @@
     default_expires => '7200 sec',
 );
+
+my $cmdflags;
 
 # Get the list of imfiles & their stats
@@ -99,4 +103,5 @@
         $cmdflags .= " $line";
     }
+    chomp $cmdflags;
 }
 
