:: Re: [DNG] OT: Perl programming ques…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Joel Roth
Fecha:  
A: dng
Asunto: Re: [DNG] OT: Perl programming question
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')

--
Joel Roth