Prev: Proper quoting (wss: Perl HTML searching)
Next: FAQ 7.7 Why do Perl operators have different precedence than C operators?
From: PerlFAQ Server on 20 Mar 2010 12:00 This is an excerpt from the latest version perlfaq5.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 5.17: Is there a leak/bug in glob()? Due to the current implementation on some operating systems, when you use the glob() function or its angle-bracket alias in a scalar context, you may cause a memory leak and/or unpredictable behavior. It's best therefore to use glob() only in list context. -------------------------------------------------------------------- The perlfaq-workers, a group of volunteers, maintain the perlfaq. They are not necessarily experts in every domain where Perl might show up, so please include as much information as possible and relevant in any corrections. The perlfaq-workers also don't have access to every operating system or platform, so please include relevant details for corrections to examples that do not work on particular platforms. Working code is greatly appreciated. If you'd like to help maintain the perlfaq, see the details in perlfaq.pod.
From: Keith Thompson on 20 Mar 2010 12:59 PerlFAQ Server <brian(a)theperlreview.com> writes: > 5.17: Is there a leak/bug in glob()? > > Due to the current implementation on some operating systems, when you > use the glob() function or its angle-bracket alias in a scalar context, > you may cause a memory leak and/or unpredictable behavior. It's best > therefore to use glob() only in list context. How old is this FAQ? Is the leak still there? -- Keith Thompson (The_Other_Keith) kst-u(a)mib.org <http://www.ghoti.net/~kst> Nokia "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"
From: brian d foy on 22 Mar 2010 15:34 In article <lnhbob53qf.fsf(a)nuthaus.mib.org>, Keith Thompson <kst-u(a)mib.org> wrote: > PerlFAQ Server <brian(a)theperlreview.com> writes: > > 5.17: Is there a leak/bug in glob()? > > > > Due to the current implementation on some operating systems, when you > > use the glob() function or its angle-bracket alias in a scalar context, > > you may cause a memory leak and/or unpredictable behavior. It's best > > therefore to use glob() only in list context. > > How old is this FAQ? Is the leak still there? The FAQ is pretty old, but I don't know for sure if the leak is still there. I'll see what I can find out. Thanks;
From: brian d foy on 23 Mar 2010 14:22
In article <220320101434074137%brian.d.foy(a)gmail.com>, brian d foy <brian.d.foy(a)gmail.com> wrote: > In article <lnhbob53qf.fsf(a)nuthaus.mib.org>, Keith Thompson > <kst-u(a)mib.org> wrote: > > > PerlFAQ Server <brian(a)theperlreview.com> writes: > > > 5.17: Is there a leak/bug in glob()? > > > > > > Due to the current implementation on some operating systems, when you > > > use the glob() function or its angle-bracket alias in a scalar > > > context, > > > you may cause a memory leak and/or unpredictable behavior. It's best > > > therefore to use glob() only in list context. > > > > How old is this FAQ? Is the leak still there? > > The FAQ is pretty old, but I don't know for sure if the leak is still > there. I'll see what I can find out. Actually, this isn't even the current answer in the FAQ. I thought that was really odd so I don't know how this snuck in there. |