in reply to grep from file

I think this will do what you want.
use strict; open (INFILE, "<infile") or die "could not open file"; my %files; while (<INFILE>) { foreach ( /(\w+\.cxx)\b/g ) { $files{$_}++; } } close INFILE; open (OUTFILE, ">outfile") or die "could not open file"; foreach (sort keys %files) { print OUTFILE "$_\n"; } close OUTFILE;
outfile will contain
aclpi.cxx i95val.cxx radiomeasurements.cxx rlpval.cxx
Note that the order is not the same. This is due to the fact that I use a hash and the keys function does not give the keys back in any particular order, so I sort them. If you want to do the build-ing in perl then you can do something like this
foreach (sort keys %files) { system "build", $_; }

--

flounder