Jenda Krynicky wrote:
> 
> From: "Yacketta, Ronald" <[EMAIL PROTECTED]>
> > I am sure someone out their in Perl land can offer a better solution
> > to the following.
> >
> >         ###
> >         ###     slurp in all the required data for the report
> >         ###
> >         open ($LOG,"cat $g_logdir/OrderServer-*.log|")
> >                 or die ( "Unable to open $g_logdir/OrderServer-*.log :
> >                 $!");
> 
> Why don't you open the file directly?
> 
>         open ($LOG,"$g_logdir/OrderServer-*.log")
>                 or die ( "Unable to open $g_logdir/OrderServer-*.log : $!");
> 
> or am I misunderstanding something?

Yes, you are missing the * character which implies that there are
multiple files.  Probably better to use glob and read from <>.

local @ARGV = glob "$g_logdir/OrderServer-*.log";

while ( <> ) {
    # process lines of log files




John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to