#!/usr/bin/perl # Given a list of symbols (or patterns), run ngp on each for all the # local .o files. for $p (@ARGV) { &onepat; } if (! $n) { for $p () { chop $p; &onepat; } } sub onepat { print "=== Pattern: $p\n"; system "ngp $p *.o"; ++$n; }