#!/usr/bin/perl # # This is a program that is intended to allow FEP operators # a tool that will facilitate in monitoring incoming transmissions # and preprocessor logs. # #------------------- Define Subroutines ------------------# # lsForCorp Subroutine designed to take an argument and do a directory # listing looking for that argument on the farm and then returning the # results. sub lsForCorp { local($corp) = $_[0]; @farmLs = `ls -ltr /usr/local/farm/*/*/input/`; foreach $farmLsFile (@farmLs) { if ($farmLsFile =~ /$corp/) { print $farmLsFile; } # end of if statement } # end of foreach statement } #end of lsForCorp subroutine #------------------- End Subroutines ---------------------# print "What corp are you looking for? " ; $whatWeWant = ; &lsForCorp("$whatWeWant");