SPUG: How to get pwd (current dir name)?

Sanford Morton smorton at pobox.com
Wed Jan 1 18:41:18 CST 2003


How may I get the name of the present working directory within Perl,
similar to the unix `pwd` command?

Also, how may I use the mode field from the stat($filename) function
to test if a file is a directory, similar to -d $filename?

Thanks,
Sandy Morton



 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org




More information about the spug-list mailing list