#!/usr/bin/perl
# look through *.fcl in FHICL_FILE_PATH for a fcl file that contains a string
# usage:  fcllookup.pl <string>

$envlist = $ENV{"FHICL_FILE_PATH"};
$symname = $ARGV[0];
@plist = split(/:/,$envlist);
foreach $ptest (@plist) {
@files=<$ptest/*.fcl>;
foreach $file (@files) {
$output = `fgrep $symname $file`;
if ($output ne "") {
print $file,"\n";
}
}
}
