"scrarymary" <(E-Mail Removed)> wrote in message

news

(E-Mail Removed)...

>

> This is part of a script

> Can someone please tell me what operations are being performed

> on the value t

>

> for (my $N = 0; $N <= $Count; $N++) {

> my $t = $N * $N
I think that should be:

my $t = $N * $N;

At the first iteration, $t is 0 (0 squared)

At the second iteration, $t is 1 (1 squared)

At the third iteration, $t is 4 (2 squared)

At the fourth iteration, $t is 9 (3 squared)

and so on ....

After $Count + 1 iterations, the loop terminates, and $t has the value

$count * $Count ($Count squared).

> $d += ($t ? $t : 1)
I think that should be:

$d += ($t ? $t : 1);

That line just assigns $d + $t to $d ... unless $t is zero (or numerically

equivalent to zero) - in which case it assigns $d + 1 to $d.

> }

>

> Also

>

> my @ii = unpack("V8", $chunk);

>

> if $chunk is 32 bytes how will the bytes be unpacked into the array

> @ii?

>
You can see by running:

print "@ii\n";

(The individual elements of @ii will be separated by a space.)

See 'perldoc perlop'.

Cheers,

Rob