never thought of myself as a script kiddie, perhaps a guy who can write 
scripts (and has kids), but nevertheless.

I can tell you why what you were doing doesn't work, but what you
are trying to do is rather silly. Not using -w isn't a good answer either
Iain :)

The reason it didn't work is because you are saying that you want to take
some value $inness[$i] and add the curren tline to it, then asign it to
$inness[$i]. Well, $inness[$i] is undefined each time you use it (because
you are incrementing $i. But again, this is silly because you really just
want the assignment

So, to preserve your current logic, use

$in = <$remote>;
$i=0;
while (substr($in, 0, 7) ne "</html>") {
    $in = <$remote>;
    $inness[$i] = $in;
    $i++;
}

instead of

> $in = <$remote>;
> while (substr($in, 0, 7) ne "</html>") {
>     $in = <$remote>;
>     $inness[$i] = $inness[$i] . $in;
>     $i++;
> }

but a better way would be

while (<$remote>) {
    last if /^<\/html>/i;
    push @inness, $_;
}


But, this is pointless. Just read from the socket and process it line by
line without the intermediate array. Also, I would get familiar with
regular expressions. You might as well be writing this in C the way you
are doing it.

> 
> The error is obviously in this line:
> 
>     $inness[$i] = $inness[$i] . $in;
> 
> In case youre wondering, this is for a school project.
> 
> Can any of you script kiddies out there help me resolve this problem?
> (Preferably before school tomorrow : -)
> 
> -David
> 

btw, you have other warnigns related to $valueness which must not always
get set. To avoid these, initialize them like

my($valueness) = "UNKNOWN";

hth
charles


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to