Index: trunk/ippScripts/scripts/warp_overlap.pl
===================================================================
--- trunk/ippScripts/scripts/warp_overlap.pl	(revision 13643)
+++ trunk/ippScripts/scripts/warp_overlap.pl	(revision 13826)
@@ -129,5 +129,5 @@
 	    my $fileLevel = $imfile->{filelevel};
 	    my $entry = "";
-	    if ($fileLevel eq "chip") {
+	    if (lc($fileLevel) eq "chip") {
 		my $class_id = $imfile->{class_id};
 		my $chipRoot = $ipprc->file_resolve( $imfile->{chip_path_base} );
@@ -136,8 +136,9 @@
 		print STDERR "class: $class_id, chiproot: $chipRoot, extname: $extname\n";
 		
-		$entry = "$psastroRootFile\[$extname\]";
+		$entry = $psastroRootFile . '\[' . $extname . '\]';
 	    } else {
 		$entry = "$psastroRootFile";
 	    }
+
 	    my @skycells = &select_skycells ($entry, @matchlist);
 	    foreach my $skycell (@skycells) {
@@ -150,5 +151,5 @@
 		push @overlaps, \%overlap;
 		
-		printf STDERR "overlap: %s : %s\n", $skycell, $imfile->{cam_id};
+		printf STDERR "overlap: %s : %s , %s\n", $skycell, $imfile->{cam_id}, $imfile->{class_id};
 		
 		# generate a unique list of the skycells
@@ -204,4 +205,6 @@
 close $overlapFile;
 
+system "cat $overlapName";
+
 # Add the processed file to the database
 unless ($no_update) {
@@ -232,13 +235,12 @@
 sub select_skycells 
 {
-    my $entry = shift;
-    my @list = @_;
-
-    my $skycell;
+    my $entry = shift;		# File+Ext to search for
+    my @list = @_;		# List of "File+Ext : skycell"
+
     my @skycells = ();
 
     foreach my $line (@list) {
 	if ($line =~ m|$entry|) {
-	    ($skycell) = $line =~ m|$entry\S*\s+:\s+(\S+)|;
+	    my ($skycell) = $line =~ m|$entry\S*\s+:\s+(\S+)|;
 	    push @skycells, $skycell;
 	}
