Главная страница


ru.perl

 
 - RU.PERL ----------------------------------------------------------------------
 From : Ruslan Bondarev                      2:4624/1.65    07 Feb 2001  13:43:31
 To : Vladimir Podgorny
 Subject : Re: узнать текущую директорию
 -------------------------------------------------------------------------------- 
 
 Среда Февраль 07 2001 10:37, Vladimir Podgorny -> All:
 
  >> `pwd`? ;)
 
  VP> Руки отбивать надо за такие советы... :( Если для *NIX-а, то
  VP> $ENV{'PWD'} спасет отца русской демократии, а как для винды не скажу -
  VP> не сталкивался.
 
     А за такой совет что ты отобьешь? (о:
 
 === Start of Windows Clipboard ===
 use Cwd;
 $dir = cwd();           # get current working directory safest way
 
 $dir = getcwd();        # like getcwd(3) or getwd(3)
 
 $dir = fastcwd();       # faster and more dangerous
 
 use Cwd 'chdir';        # override chdir; keep PWD up to date
 chdir "/tmp";
 print $ENV{PWD};        # prints "/tmp"
 
 cwd() gets the current working directory using the most natural and safest form 
 for the current architecture. For most systems it is identical to `pwd` (but
 without the trailing line terminator).
 
 getcwd() does the same thing by re-implementing getcwd(3) or getwd(3) in Perl.
 
 fastcwd() looks the same as getcwd(), but runs faster. It's also more dangerous 
 because you might chdir out of a directory that you can't chdir back into.
 
 It is recommended that one of these functions be used in all code to ensure
 portability because the pwd program probably only exists on UNIX systems.
 
 If you consistently override your chdir built-in function in all packages of
 your program, then your PWD environment variable will automatically be kept up
 to date. Otherwise, you shouldn't rely on it. (Which means you probably
 shouldn't rely on it.)
 === End of Windows Clipboard ===
 
 ... bye.
 --- What can change the nature of a man?..
  * Origin:  (2:4624/1.65)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 узнать текущую директорию   Dmitriy Amelin   05 Feb 2001 21:20:16 
 Re: узнать текущую директорию   Alexander Babanov   06 Feb 2001 22:19:10 
 Re: узнать текущую директорию   Vladimir Podgorny   07 Feb 2001 11:37:05 
 Re: узнать текущую директорию   Konstantin Tokar   07 Feb 2001 12:47:49 
 Re: узнать текущую директорию   Vladimir Podgorny   07 Feb 2001 13:02:05 
 Re: узнать текущую директорию   Konstantin Tokar   07 Feb 2001 13:44:59 
 Re: узнать текущую директорию   Alexander Babanov   07 Feb 2001 11:21:31 
 Re: узнать текущую директорию   Ruslan Bondarev   07 Feb 2001 13:43:31 
 Re: узнать текущую директорию   Vladimir Podgorny   07 Feb 2001 19:38:51 
 Re: узнать текущую директорию   Alexander Babanov   07 Feb 2001 11:16:21 
Архивное /ru.perl/27933a81433a.html, оценка 2 из 5, голосов 10
Яндекс.Метрика
Valid HTML 4.01 Transitional