@rem = ' This is a perl script for NT. @echo off @ccperl "%~f0" %1 @goto endofperl @rem '; require File::Temp; use File::Temp qw/ :POSIX /; # create the temp file ($fh, $file) = tmpnam(); END { # get rid of the temp file at the end. close $fh; unlink($file) or die "Couldn't unlink $file : $!"; } # quote for spaces $ARGV[0]='"'.$ARGV[0].'"' if ($ARGV[0]=~/\s/); $labels=`cleartool lshist -fmt \"\%l\" $ARGV[0]`; $labels=~s/\)\(/\,/g; $labels=~s/(\(|\))//g; @labellist=split /\,\s*/,$labels; @labellist=sort @labellist; foreach $label (@labellist) { $label.=","; } print $fh "@labellist"; if (!system("clearprompt list -outfile $file -dfile $file -prompt \"Select label to compare with\"")) { seek($fh, 0, 0); $chosenlabel=<$fh>; print $file; `cleardlg \/diffother $ARGV[0] $ARGV[0]\@\@\\$chosenlabel`; } __END__ :endofperl