home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / perl / 7635 < prev    next >
Encoding:
Text File  |  1992-12-31  |  1.4 KB  |  36 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!convex!tchrist
  3. From: Tom Christiansen <tchrist@convex.COM>
  4. Subject: Re: file handle unknown in subroutine
  5. Message-ID: <1992Dec31.122259.6709@convex.com>
  6. Originator: tchrist@cvxcs.cs.convex.com
  7. Sender: usenet@convex.com (news access account)
  8. Nntp-Posting-Host: cvxcs.cs.convex.com
  9. Reply-To: tchrist@convex.COM (Tom Christiansen)
  10. Organization: Convex Computer Corporation, Colorado Springs, CO
  11. References: <1992Dec28.221202.24649@watson.ibm.com>
  12. Distribution: usa
  13. Date: Thu, 31 Dec 1992 12:22:59 GMT
  14. X-Disclaimer: This message was written by a user at CONVEX Computer
  15.               Corp. The opinions expressed are those of the user and
  16.               not necessarily those of CONVEX.
  17. Lines: 17
  18.  
  19. From the keyboard of sundare@watson.ibm.com (C. Sundaresan):
  20. :I open a file in the main part of the Perl script and writing
  21. :to it works fine, but in my subroutines the file handle seems
  22. :to be unknown.  Is the scoping for filehandles unlike that of
  23. :variables?
  24.  
  25. Not really, although if you're localizing indirect filehandles 
  26. you may get a surprise.
  27.  
  28. A code demo would be useful to see what's going on.
  29.  
  30. --tom
  31. -- 
  32. "GUIs normally make it simple to accomplish simple actions and impossible
  33. to accomplish complex actions."   --Doug Gwyn  (22/Jun/91 in comp.unix.wizards)
  34.  
  35.      Tom Christiansen           tchrist@convex.com      convex!tchrist
  36.