#!/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. use strict; sub lsForCorp { my $corp = $_[0]; require File::Spec; my $path = File::Spec->catfile( File::Spec->rootdir(), qw(usr local farms * * input), "*$corp*" ); my @farms = glob($path); foreach my $farm (@farms) { print $farm, "\n"; } # end of foreach statement } #end of lsForCorp subroutine #------------------- End Subroutines ---------------------# print "What corp are you looking for? " ; chomp(my $whatWeWant = ); lsForCorp($whatWeWant);