Randal L. Schwartz wrote on 26.07.2005:
>The following message is a courtesy copy of an article
>that has been posted to perl.beginners as well.
>
>> "Jan" == Jan Eden <[EMAIL PROTECTED]> writes:
>
>Jan> chdir "/some/dir";
>
>This might have failed...
>
>Jan> mkdir "newsubdir/" or die "$!";
>
> "Jan" == Jan Eden <[EMAIL PROTECTED]> writes:
Jan> chdir "/some/dir";
This might have failed...
Jan> mkdir "newsubdir/" or die "$!";
which would make this in the wrong directory. Are you checking that?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http
Jan Eden wrote:
>
> John W. Krahn wrote on 26.07.2005:
>
>>Jan Eden wrote:
>>
>>>this does not work:
>>>
>>>mkdir "/some/dir/newsubdir" or die "$!";
>>That works for me. What error message do you get?
>>
> I get "File exists". /some/dir does exist, but newsubdir does not.
The message "File exis
Xavier Noria wrote on 26.07.2005:
>On Jul 26, 2005, at 11:31, Jan Eden wrote:
>> But I wonder why my initial example works for you. File::Path doc
>> says:
>>
>> 'The "mkpath" function provides a convenient way to create
>> directories, even if your "mkdir" kernel call won't create more
>> t
On Jul 26, 2005, at 11:31, Jan Eden wrote:
But I wonder why my initial example works for you. File::Path doc
says:
'The "mkpath" function provides a convenient way to create
directories, even if your "mkdir" kernel call won't create more
than one level of directory at a time. '
But my sy
Hi John,
John W. Krahn wrote on 26.07.2005:
>Jan Eden wrote:
>> Hi,
>
>Hello,
>
>> this does not work:
>>
>> mkdir "/some/dir/newsubdir" or die "$!";
>
>That works for me. What error message do you get?
>
I get "File exists". /some/dir does exist, but newsubdir does not.
>Have you tried the mk
Jan Eden wrote:
> Hi,
Hello,
> this does not work:
>
> mkdir "/some/dir/newsubdir" or die "$!";
That works for me. What error message do you get?
Have you tried the mkpath() function from the File::Path module?
perldoc File::Path
John
--
use Perl;
program
fulfillment
--
To unsubscribe,
Jan Eden wrote on 26.07.2005:
>Hi,
>
>this does not work:
>
>mkdir "/some/dir/newsubdir" or die "$!";
>
>while this does:
>
>chdir "/some/dir"; mkdir "newsubdir/" or die "$!";
>
>In the shell, I can obviously execute the former.
>
>Is it true that in Perl, I can create a directory only within the
Hi,
this does not work:
mkdir "/some/dir/newsubdir" or die "$!";
while this does:
chdir "/some/dir";
mkdir "newsubdir/" or die "$!";
In the shell, I can obviously execute the former.
Is it true that in Perl, I can create a directory only within the current
working directory?
Thanks,
Jan
--