home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / perl / 5415 < prev    next >
Encoding:
Text File  |  1992-08-21  |  971 b   |  24 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!decwrl!world!dsb
  3. From: dsb@world.std.com (David Boyce)
  4. Subject: Re: Filename expansion ("~user")
  5. Message-ID: <BtCF9y.21s@world.std.com>
  6. Keywords: ~user filename expansion
  7. Organization: The World Public Access UNIX, Brookline, MA
  8. References: <1992Aug20.153727.167@cbnews.cb.att.com>
  9. Distribution: usa
  10. Date: Fri, 21 Aug 1992 17:00:59 GMT
  11. Lines: 11
  12.  
  13. In article <1992Aug20.153727.167@cbnews.cb.att.com> daleske@cbnews.cb.att.com (John D. Daleske) writes:
  14. >I'm relatively new to Perl and love it.  I've read the recent notes in this
  15. >notes group and have not found how do one capability that I am trying to
  16. >use in a Perl script which is the ~user filename expansion.
  17.  
  18.     The "getpwent" function function should make this info available.
  19. You may not be able to use the ~user idiom, but you can write
  20. a little function called tilde(user) that uses getpwent and does
  21. the right thing.
  22. -- 
  23. David Boyce    dsb@world.std.com    617-576-1540
  24.