I have a Perl script that is trying to run a ClearCase script called "cleartool find" The issue is that is needs to be ran in a /../vob directory and not sure how to get the script to run in that directory.
#!/usr/bin/env perl use warnings; use strict; use Cwd; sub main() { stat("ls l-tr"); my %files; chdir ("/view/conflictcheck.view1/vobs/app_bos") or die "canno +t change: $!\n"; print(cwd); while (<>) { my ($branch, $count); chomp; $branch = $_; next if !$branch; print "Scanning $branch\n"; open(FILES, "cleartool find . -nxn -ele \"version(/mai +n/$branch/LATEST)\" -print |"); while (<FILES>) { chomp; push @{$files{$_}}, $branch; $count++; } close(FILES); if (!$count) { print "WARNING: $branch does not contain any files.\ +n" } } print "Calculating conflicts\n"; foreach my $file (keys %files) { my $len = @{$files{$file}}; next unless ($len > 1) && (-f $file); print "$file\n"; for (my $i = 0; $i < $len; $i++) { print " $files{$file}[$i]\n"; } } }

In reply to ClearCase and Perl by czach12345

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.