Re: chdir and mkdir

2005-07-26 Thread Jan Eden
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 "$!"; >

Re: chdir and mkdir

2005-07-26 Thread Randal L. Schwartz
> "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

Re: chdir and mkdir

2005-07-26 Thread John W. Krahn
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

Re: chdir and mkdir

2005-07-26 Thread Jan Eden
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

Re: chdir and mkdir

2005-07-26 Thread Xavier Noria
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

Re: chdir and mkdir

2005-07-26 Thread Jan Eden
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

Re: chdir and mkdir

2005-07-26 Thread John W. Krahn
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,

Re: chdir and mkdir

2005-07-26 Thread Jan Eden
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

chdir and mkdir

2005-07-26 Thread Jan Eden
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 --