I have rather big script (tcp server), and there is one problem with it, from time to time (randomly) the loops are crashing... Lets assume that this loop should execute 100 times, but then i get error (on STDERR) like these lower, and this executed 28 (for ex.) times and finished...
I search through the web and haven't found anything... (just similiar problems without answers)
The question is: Where's the problem, and how to solve it?
Below you hove my script "logs" and corresponding fragment of code.
./us2.pl 257: connection from localhost [ 127.0.0.1 ] at port 1375 at Wed Nov 29 12:24:22 2000 Attempt to free unreferenced scalar at ./us2.pl line 263, <FOL> line 7 +. Attempt to free unreferenced scalar at ./us2.pl line 282. Attempt to free unreferenced scalar at ./us2.pl line 264. Attempt to free unreferenced scalar at ./us2.pl line 282. Attempt to free unreferenced scalar at ./us2.pl line 264. Attempt to free unreferenced scalar at ./us2.pl line 282. Attempt to free unreferenced scalar at ./us2.pl line 264. Attempt to free unreferenced scalar at ./us2.pl line 282. Attempt to free unreferenced scalar at ./us2.pl line 264. Attempt to free unreferenced scalar at ./us2.pl line 282. Attempt to free unreferenced scalar at ./us2.pl line 263, <FOL> line 1 +2. Attempt to free unreferenced scalar at ./us2.pl line 282. Attempt to free unreferenced scalar at ./us2.pl line 263, <FOL> line 1 +3. 263 open (LISTA, "find $folder -type f|"); 264 while (my $lista = <LISTA>) { 265 $ile++; 266 if ($lista eq "") {print "Folder pusty\n";$dbh +->disconnect();exit 6;} 267 if ($lista =~ /S/) { $ile_starych++; } 268 } 269 close (LISTA); 270 271 #&licz_maile; 272 # $folder = $home . "/" . $fol_wzg . "/cur"; &licz_mail +e; 273 print "name_f",$kt,"\`=\`",$fol_wzg; 274 &sep_par; 275 print "all_mail",$kt,"\`=\`",$ile; 276 &sep_par; 277 print "new_mail",$kt,"\`=\`",$ile - $ile_starych; 278 &sep_par; 279 print "read_mail",$kt,"\`=\`",$ile_starych; 280 &sep_par; 281 $folder = $home . "/" . $fol_wzg; 282 open (DU, "du -s $folder|"); 283 my $temp = <DU>; 284 close (DU); -- Daniellek

In reply to Attempt to free unreferenced scalar... by Daniellek

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.