SPUG: Win32, use Cwd, and $ENV{PWD}
Jamie Shaffer
jshaffer at chronology.com
Fri Sep 3 09:16:53 CDT 1999
What's the difference between using Cwd to get the getCwd() function
and using Win32? My scripts need to run on several platforms,
so I 'use Cwd;' and make all of my code the same. I don't have Win32.pm
installed so I can't run a test...could somebody tell me what difference
I would see? Thanks!
--Hey, I'm no longer just a lurker! ;)
Ken McGlothlen wrote:
> 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
--
__________________________________________________
Jamie Shaffer
Chronology Corporation jshaffer at chronology.com
14715 NE 95th Street www.chronology.com
Redmond, WA 98052
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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