For Programmers: Free Programming Magazines  


Home > Archive > PERL Programming > April 2006 > Array issue









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Array issue
johnny2006

2006-04-18, 12:07 am

Hello all I am having a problems matching vales from two diffrent arrays with the same value from diffrent indexs.

Here is the code.

$link = "192.168.0.1_fecn_becn";
#deleted out _fecn_becn with edit array.
$link = $edit3[0];

#Search array of ips for matching value to alert value or @edit3[0] or 192.168.0.1
#this should work

for($count = 0; $count <= @edit1; $count++){
if( @edit1[$count] == @edit3[0] ){
print @edit2[$count];
}
}

at this point @edit1[3] and @edit3[0] have the same value 192.168.0.1. I could also use an if loop with the exact values agenst each other and it still does not see that they equal the same thing? I am at a loss. help would be appreciated.

thank,
johnny
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com