Re: IO::File close on undef behaviour?

2009-08-12 Thread Philip Potter
2009/8/12 Telemachus : > On Wed Aug 12 2009 @ 11:27, Philip Potter wrote: >> If $fh goes out of scope, will the file be automatically closed? > > Yup. From perldoc perlopentut: > >    Another convenient behavior is that an indirect filehandle >    automatically closes when it goes out of scope or w

Re: IO::File close on undef behaviour?

2009-08-12 Thread Telemachus
On Wed Aug 12 2009 @ 11:27, Philip Potter wrote: > If $fh goes out of scope, will the file be automatically closed? Yup. From perldoc perlopentut: Another convenient behavior is that an indirect filehandle automatically closes when it goes out of scope or when you undefine it: su

Re: IO::File close on undef behaviour?

2009-08-12 Thread Jenda Krynicky
From: Philip Potter > Dear all, > > I'm trying to learn to use the IO::File object as a means of passing a > filehandle from one function to another. In the perldoc documentation > for IO::File, it gives the example: > > undef $fh; # automatically closes the file > > but in the reference

Re: IO::File close on undef behaviour?

2009-08-12 Thread Philip Potter
2009/8/12 Shawn H. Corey : > Philip Potter wrote: >> >> I'm trying to learn to use the IO::File object as a means of passing a >> filehandle from one function to another. In the perldoc documentation >> for IO::File, it gives the example: >> >> undef $fh;       # automatically closes the file >> >>

Re: IO::File close on undef behaviour?

2009-08-12 Thread Shawn H. Corey
Philip Potter wrote: Dear all, I'm trying to learn to use the IO::File object as a means of passing a filehandle from one function to another. In the perldoc documentation for IO::File, it gives the example: undef $fh; # automatically closes the file but in the reference that follows, it

IO::File close on undef behaviour?

2009-08-12 Thread Philip Potter
Dear all, I'm trying to learn to use the IO::File object as a means of passing a filehandle from one function to another. In the perldoc documentation for IO::File, it gives the example: undef $fh; # automatically closes the file but in the reference that follows, it gives no indication fo