Nate Brunson wrote:
> ok this is my delema, i am trying to read from this file using:
> read(FILEHANDLE, $buffer, $size);
You can get a file size using:
$size = -s FILEHANDLE;
or
$size = -s "filename";
but you don't need to know the size if you just want to read the entire
file into your $buffer, instead use this code:
{ local $/; $buffer = <FILEHANDLE> }
If your file is very big then maybe you should process it line by line:
while(<FILEHANDLE>){
# do something with the line in $_
}
- RaFaL Pocztarski, [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]