Re: Current directory?
- From: jeffpyh@xxxxxxxxx (Jeff Peng)
- Date: Thu, 29 Sep 2005 16:27:13 +0800
#!/usr/bin/perl
use strict;
use Cwd;
print getcwd,"\n"; #get the current path
print $ENV{PATH}; #get the path from environment variable
2005/9/29, gustav@xxxxxxxxxxxxxx <gustav@xxxxxxxxxxxxxx>:
> Hi there!
>
> I want to get the current environment variable (current directory), and I
> type like this:
>
> $currentpath = %ENV;
>
> and I get something like 37/64
> instead of maybe usr/username/test
>
> How do I get current directory?
>
> /G
>
>
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscribe@xxxxxxxx
> For additional commands, e-mail: beginners-help@xxxxxxxx
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
>
--
Jeff Peng
jeffpyh@xxxxxxxxx
.
- Follow-Ups:
- Re: Current directory?
- From: Gustav Wiberg
- Re: Current directory?
- References:
- Current directory?
- From: gustav
- Current directory?
- Prev by Date: Re: Current directory?
- Next by Date: Re: Current directory?
- Previous by thread: Re: Current directory?
- Next by thread: Re: Current directory?
- Index(es):
Relevant Pages
|