in reply to chdir fails
It is unnecessary and good practice not to put code tags around the whole text of your question. Only putting code tags around the code portion of your question is necessary. It makes it easier in case you have a lot of code for people to just d/l the code, and helps to visually seperate your code from plain text.
As for your question why not do something like the following instead:
where the file_name is the name of the file you are working with in that directory, that is unless you have a reason you absolutely have to chdir.my $active_directory = '/logg/'; my $working_file = $active_directory . "file_name"; open (FILE, $working_file) or die "Cannot open $working_file\n$!";
-enlil
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: chdir
by dmitri (Priest) on Jan 24, 2003 at 18:19 UTC |