On 03/02/2025 19:29, Fred wrote: > On 2/3/25 12:52, Joel Roth via Dng wrote:
>> Lars Noodén via Dng wrote:
>>> Also, it is unclear why you appear to be using a constant to hold a
>>> file
>>> name. Instead, you might be interested in trying CPAN's File::Temp
>>> module to manage temporary files and/or directories.
>>
>> Hi Lars,
>>
>> TMPFILE in `seek(TMPFILE,20,0)` is not a constant but a
>> filehandle. Bareword filehandles are not recommended
>> nowadays.
>>
>> open( my $fh, '>', 'foo.tmp' )
>> is preferred to
>>
>> open( TMPFILE, '>', 'foo.tmp')
>> The recommended way to use file handles is with the Perl module
FileHandle. Try
perldoc FileHandle
from the command line for usage and examples.
More to the point
perldoc File::Temp
Perl modules such as these are very similar to the FILE handle library of C.