SPUG: Win32, use Cwd, and $ENV{PWD}

Ken McGlothlen mcglk at serv.net
Tue Aug 31 16:31:54 CDT 1999


Stuart Poulin <stuart_poulin at yahoo.com> writes:

| This is a shame.  On Unix I use to use Cwd; and $ENV{PWD} to track the
| current directory.  Doesn't seem to work on NT or Windows 98.

No, it sure doesn't.  However, you can use the following:

	#!/perl/bin/perl
	# Teeny code fragment.

	use Win32;

	local( $currentdir ) = Win32::GetCwd();


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    POST TO: spug-list at pm.org        PROBLEMS: owner-spug-list at pm.org
 Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
 SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
        Email to majordomo at pm.org: ACTION spug-list your_address





More information about the spug-list mailing list