Hi,

I have a set of strings in array @search_key and a log file loaded into an
array @modem_log.

I want to extract lines that contain the keys and load them into four
arrays - @env_start, @env_end, @env_files, @env_bytes, @env_errors.

Can somebody tell me if what I am doing below is right?

Thanks for your help...
Satya::Novice_City

----------------------------------------------------------------------------------------------------------------
my @search_key = qw (FILETYPE.ZIP RBZ RBZ Bytes Errors);
my @search_out =  qw( \@env_start  \@env_end  \@env_files  \@env_bytes
\@env_errors );

    for ($i = 0, $j = 0; $i < @search_key; $i++)
    {
        ${search_out[$i]} = grep (/$search_key[$i]/,@modem_log);
        for ($j = 0; $j < ${search_out[0]}; $j++)
        {
           ${search_out[$i]} = substr ($search_out[$i][$j],$str_start
[$j].$str_length[$j]);
        }
    }
----------------------------------------------------------------------------------------------------------------






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

Reply via email to