Not getting all the element.

2008-11-29 Thread slow_leaner
Hello all, what am i missing!!! #!/usr/bin/perl -w @array_number =; @new_array = half( @array_number ); print "@new_array\n"; sub half { @numbers = @_; while (<@numbers>){ @n = $_ / 2; @new_a = pop(@n); } return @new_a; } #I am calling a sub function "half". #but it r

Re: merge 2 or more files together without creating new file

2008-11-05 Thread slow_leaner
On Nov 1, 6:57 am, [EMAIL PROTECTED] (John W. Krahn) wrote: > slow_leaner wrote: > > On Oct 31, 10:27 am, [EMAIL PROTECTED] (Slow_leaner) wrote: > > >> Is there a way I can marge FILE2 into FILE1 or reverse together > >> without creating a new merge file. I am not su

Re: merge 2 or more files together without creating new file

2008-11-01 Thread slow_leaner
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. >

merge 2 or more files together without creating new file

2008-10-31 Thread slow_leaner
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 =; close (FILE1);

Re: matching elements from array and print the results line by line from log file

2008-10-30 Thread slow_leaner
On Oct 28, 2:51 pm, [EMAIL PROTECTED] (Andy Cravens) wrote: > -Original Message- > From: slow_leaner [mailto:[EMAIL PROTECTED] > Sent: Tue 10/28/2008 11:58 AM > To: [EMAIL PROTECTED] > Subject: matching elements from array and print the results line by line from > lo

matching elements from array and print the results line by line from log file

2008-10-28 Thread slow_leaner
Hi, I have a list of element in array that I would like to match the pattern in logs file. I have hard time take element from array and matching it. More then weeks now and don't know where to find in man page. please help me. Here is my code. #!/usr/bin/perl -w open ( FILE, " /var/log/cisco.log