close("all open files") - possible?

Ask a Question related to PERL Miscellaneous, Design and Development.

  1. #1

    Default close("all open files") - possible?

    Hi

    I have a problem with my Perl script not deleting all - but only some -
    temporary files it is supposed to delete. The r/w file status is 777.

    The only thing I can think of is that I have unclosed file handles laying
    around in the code. Is there some easy way of closing all open file handles
    in one go, or will I have to track them down one by one?

    Thanks,

    J
    jon rogers Guest

  2. Similar Questions and Discussions

    1. How to add "..." button to a property to open up "File Open"?
      I am creating a control and thinking about adding a property to the control. I will like a "..." button shown next to the value of this property...
    2. Gretag Macbeth i1Match v2.0.3a update disables "Open" command for Photoshop files
      After I installed the i1Match v2.0.3a update, I am no longer able to open Photoshop files by using the "open" command in the Finder window. However,...
    3. animation "open" onPress( animation "close" ) go to Frame "myFrame"
      I have searched hi and low for the answer and nothing has helped me as of yet. My Main timeline is sectioned off by keyframes that are 10 frames...
    4. Unable To Open "Recent Files"
      I've seen this discussed before, but since the Forum Search Engine does not seem to be working, I'll ask it again: I am unable to open files from the...
    5. "Too many files open"
      I'm popping back in to say "thanks" to all for their suggestions. I'm going to be visiting my mom in a few weeks and will be able to get my hands...
  3. #2

    Default Re: close("all open files") - possible?

    jon rogers wrote:

    (snipped)
    > I have a problem with my Perl script not deleting all - but only some -
    > temporary files it is supposed to delete.

    Your error messages state what?


    Purl Gurl
    --
    Perl Documentation : Apache Documentation
    Kick Ass Programs : Kick Ass Rock N Roll
    [url]http://www.purlgurl.net[/url]
    Purl Gurl Guest

  4. #3

    Default Re: close("all open files") - possible?

    On Thu, 11 Sep 2003 17:13:43 +0200
    jon rogers <jon.rogers@tv.tu> wrote:
    > I have a problem with my Perl script not deleting all - but only
    > some - temporary files it is supposed to delete. The r/w file status
    > is 777.
    And your error is ($!) when trying to delete them?
    >
    > The only thing I can think of is that I have unclosed file handles
    > laying around in the code. Is there some easy way of closing all
    > open file handles in one go, or will I have to track them down one
    > by one?
    If you use IO::File to open/read/write/close the files, when you
    'undef' the file handle, the file will close.

    Having said that, what do you mean by "temporary"? Are these files
    you open or are opened using IO::File?

    --
    Jim

    Copyright notice: all code written by the author in this post is
    released under the GPL. [url]http://www.gnu.org/licenses/gpl.txt[/url]
    for more information.

    a fortune quote ...
    It wasn't that she had a rose in her teeth, exactly. It was more
    like the rose and the teeth were in the same glass.
    James Willmore Guest

  5. #4

    Default Re: close("all open files") - possible?

    In article <bjq2sn$cn8$1@news.gu.se>,
    jon rogers <jon.rogers@tv.tu> wrote:

    : I have a problem with my Perl script not deleting all - but only
    : some - temporary files it is supposed to delete. The r/w file
    : status is 777.
    :
    : The only thing I can think of is that I have unclosed file handles
    : laying around in the code. Is there some easy way of closing all open
    : file handles in one go, or will I have to track them down one by one?

    Can you provide a *small* example that demonstrates the problem?

    Greg
    --
    When the people find that they can vote themselves money, that will
    herald the end of the republic.
    -- Ben Franklin
    Greg Bacon Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139