FireyIce01 has asked for the wisdom of the Perl Monks concerning the following question:
So any ideas on what I need to do differently? I know right now I'm just looking at the input directory, trying to start small, was going to have it check save and failed, and find the log after I figured out the path structure.#!/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 = <STDIN>; &lsForCorp("$whatWeWant");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Directory listing
by Tanktalus (Canon) on Jan 17, 2005 at 04:51 UTC | |
by FireyIce01 (Novice) on Jan 17, 2005 at 05:03 UTC | |
by Tanktalus (Canon) on Jan 17, 2005 at 14:59 UTC | |
by FireyIce01 (Novice) on Jan 18, 2005 at 04:37 UTC | |
by Tanktalus (Canon) on Jan 18, 2005 at 04:47 UTC | |
| |
|
Re: Directory listing
by Zaxo (Archbishop) on Jan 17, 2005 at 05:18 UTC | |
|
Re: Directory listing
by davido (Cardinal) on Jan 17, 2005 at 04:40 UTC | |
by vek (Prior) on Jan 17, 2005 at 07:36 UTC | |
by merlyn (Sage) on Jan 17, 2005 at 17:09 UTC | |
by FireyIce01 (Novice) on Jan 17, 2005 at 04:52 UTC | |
by Tanktalus (Canon) on Jan 17, 2005 at 04:54 UTC |