home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / perl / 6976 < prev    next >
Encoding:
Internet Message Format  |  1992-11-14  |  1.8 KB

  1. Path: sparky!uunet!ulowell!news.bbn.com!noc.near.net!news.centerline.com!sebastian.centerline.com!user
  2. From: dewey@centerline.com (Devan F. dewey)
  3. Newsgroups: comp.lang.perl
  4. Subject: Bad free() error???
  5. Followup-To: comp.lang.perl
  6. Date: 13 Nov 1992 17:34:13 GMT
  7. Organization: CenterLine Software, Inc.
  8. Lines: 48
  9. Distribution: world
  10. Message-ID: <dewey-131192123446@sebastian.centerline.com>
  11. NNTP-Posting-Host: 140.239.3.212
  12.  
  13. Has anyone ever seen this error:
  14.  
  15. Bad free() ignored at newreports.pl line 354, <> line 4.
  16.  
  17. The code that it points to is:
  18.  
  19.    351  sub             getparam {
  20.    352          local($paramname, $string, $format, $req) = @_;
  21.    353
  22.    354          $input = &getinput($string, $format, $req);
  23.    355          $parameter = " $paramname=$input";
  24.    356          return $parameter;
  25.    357  }
  26.    358
  27.    359  sub             getinput {
  28.    360          local($string, $format, $req) = @_;
  29.    361
  30.    362          $nogo = 1;
  31.    363          while ($nogo) {
  32.    364                  print "\nEnter $string";
  33.    365                  print " (Hint: $format)" if $format;
  34.    366                  print ": ";
  35.    367                  $input = <>;
  36.    368                  chop $input;
  37.    369
  38.    370                  if ($input eq "" & $req) {
  39.    371                          print "\n$string may not be empty.\n";
  40.    372                          $nogo = 1;
  41.    373                  } else {
  42.    374                          $nogo = 0;
  43.    375                  }
  44.    376          }
  45.    377
  46.    378          return $input;
  47.    379  }
  48.    380
  49.  
  50.  
  51. Thanks for any thoughts.
  52.  
  53. -Devan
  54.  
  55.                              
  56.                Devan F. Dewey | Senior Systems Analyst
  57.           CenterLine Software | dewey@centerline.com
  58.             10 Fawcett Street | "Leme esplain - no dere is
  59.           Cambridge, MA 02138 | too much. Leme sum up."
  60.                                        -Inigo Montoya
  61.