On Thu, Mar 21, 2002 at 01:22:26PM +1200, Michael Clarke wrote:
> [21861]ERR: 24: Line 4: Error in Perl code: Can't use string ("test.zip") as a
>symbol ref while "strict refs" in use at /foo/bar/getfile.epl line 16, <GEN1> chunk
>15.
> #--------------------------------------------------------#
> $f1 = "test.zip";
> open (IN, $f1);
> $fh1 = *IN;
> $offset=0;
> while (read ($fh1, $buffer, 1024, $offset)){
> $offset += 1024;
> }
> close($f1);
> #---------------------------------------------------------#:
the "$fh1 = *IN;" is doing exciting things.
you meant:
$f1 = "test.zip";
open (IN, $f1);
while (read(IN, $buffer, 1024, $offset)) {
$offset += 1024;
}
close(IN);
read "perldoc -f open" and "perldoc perlopentut"
--
- Gus
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]