On Oct 31, 10:27 am, [EMAIL PROTECTED] (Slow_leaner) wrote:
> Hi,
> Is there a way I can marge FILE2 into FILE1 or reverse together
> without creating a new merge file. I am not sure there are a better
> way to do it. If you give me some hint or help, i would appreciate
> it.
> thx.
> Here is my code.
>
> #!/bin/usr/perl
>
> open(FILE1, /usr/test1.txt);
> @temp =<FILE1>;
> close (FILE1);
>
> open(FILE2, /usr/test2.txt);
> @temp =<FILE2>;
> close (FILE2);

Let me just add this to be clear.
I am so beginner, almost 4 moths, and not getting anywhere with perl.
I need some fire in my heart to keep me going. I just want someone to
show me how to fish but not to give me a fish. So all experts out
there please give me some hint.

this is what I would like to do.
I know how to read one file into array. BUT

1. I would like to merge 2 logs file into array lets called
@array_of_logs. I might be add more logs file into this array later.
So that i can just type the another log file in to array without
writing another open close code.  # my most difficult part.

2. matching the pattern that i have in array called  @matching_list =
qr(a|b|test|go\thome|)      #know how to match.

3. email it to me if match any. (not sure what man page i should be
reading for)

SO all expert out there please give me some hint for this code.

thx.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to