home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / perl / 7367 < prev    next >
Encoding:
Internet Message Format  |  1992-12-11  |  1.6 KB

  1. Path: sparky!uunet!ogicse!emory!gatech!udel!louie!braindamaged.cis.udel.edu!pyrros
  2. From: pyrros@braindamaged.cis.udel.edu (Christos T. Pyrros)
  3. Newsgroups: comp.lang.perl
  4. Subject: Error:  Allocation to large in Perl for DOS -- bug?
  5. Message-ID: <1992Dec11.191756.16339@udel.edu>
  6. Date: 11 Dec 92 19:17:56 GMT
  7. Article-I.D.: udel.1992Dec11.191756.16339
  8. Sender: usenet@udel.edu (USENET News Service)
  9. Organization: University of Delaware, Newark
  10. Lines: 45
  11. Nntp-Posting-Host: braindamaged.cis.udel.edu
  12.  
  13. When running the program below, I'm getting the following error:
  14.  
  15. Allocation to large: 11fe6
  16.  
  17. This error occurs on binary files that are over 200k or so.  The binary
  18. files are AutoCAD Release 12 plot files for CalComp plotters.  Strangely,
  19. this problem does NOT occur on AutoCAD Release 11 plot files, which are
  20. slightly different.
  21.  
  22. Here is the program:
  23.  
  24. $absoutfile="c:\\tmp\\tmp.cdl";
  25. $absinfile="c:\\tmp\\120.plt";
  26.  
  27. print "\nGenerating $absoutfile from $absinfile...\n";
  28.  
  29. open(NEWFILE,">$absoutfile") || die "Can't write to $absoutfile!\n";
  30. open(REALFILE,"$absinfile") || die "Can't read file $absinfile!\n";
  31.  
  32. while(<REALFILE>)
  33. {
  34.     if (!//) {next;}
  35.     print NEWFILE;
  36. }
  37. close(NEWFILE);
  38.  
  39.  
  40. I'm using DOS 5.0 (mem reports 565k avail), and perl for DOS:
  41.  
  42.  
  43. This is perl, version 4.0
  44.  
  45. $RCSfile: perl.c,v $$Revision: 4.0.1.6 $$Date: 91/11/11 16:38:45 $
  46. Patch level: 19
  47.  
  48. Copyright (c) 1989, 1990, 1991, Larry Wall
  49. MS-DOS port Copyright (c) 1989, 1990, Diomidis Spinellis
  50. V1.5 Borland C++ & VROOM port Copyright (c) 1992, Stuart Phillips
  51.  
  52.  
  53. Is this a bug?  Or am I doing something wrong?
  54.  
  55. Thank you,
  56.  
  57. Chris
  58.