45 users online (0 members and 45 guests)  


  Results 1 to 6 of 6

Related

  1. Help on creating database    Forum: Databases
    Replies: 0
  2. Help Creating print.css    Forum: CSS Forum
    Replies: 1
  3. Creating Pages in HTML    Forum: HTML Forum
    Replies: 1
  4. Creating scroll bar    Forum: HTML Forum
    Replies: 1
  1. #1
    Merowingian's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2006
    Posts
    3

    Creating a directory with mkdir

    Hi guys,

    I'm actually using perl for simple, non-web based programming.

    I'm writing a "radio" script that should create a directory using:

    mkdir "/home/marvin/Multimedia/MP3s/Radio/PROBE", 0700;

    but I'm getting the following error:

    Unsuccessful stat on filename containing newline at /home/marvin/bin/radio line 128

    I've tried Google, but I only got some MySQL related answers, I'm not using MySQL.

    What's the problem? I've already checked the ACLs of that directory, they are all right.

    Btw, I'm using the cygwin version of perl on cygwin.

    Thanks

    Merowingian

  2. #2
    ALL's Avatar
    Super Dooper Nerd

    Status
    Offline
    Join Date
    Feb 2005
    Location
    localhost
    Posts
    382

    Re: Creating a directory with mkdir

    ummm... i havent worked with perl in a while, but i think this may be worth mentioning...

    when you are setting something to a static name (ie: something that doesnt change unless changed manually), you should always use single quotes rather than double quotes to avoide confusion.

    If i had to guess, i would say that perl is treating everything in the double quotes as a regular expression (but i dont believe it should be doing that).

    Try chaneing those to a single quote, and if that doesnt work, try using chdir() function to change the current working directory first, then just use the directory you are freating's name insted of trying to point all the way down the line.

    but honestly it should work from what i remember of perl,
    -ALL

  3. #3
    Merowingian's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2006
    Posts
    3

    Re: Creating a directory with mkdir

    Nope, sorry, that didn't help.

    But what's the usual cause of this "couldn't stat filename" problem?
    Last edited by Merowingian; 12-22-2006 at 11:19 AM.

  4. #4
    Merowingian's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2006
    Posts
    3

    Re: Creating a directory with mkdir

    I'm still having the same problem. Any solutions?

  5. #5
    DeadMeatGF's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    381

    Re: Creating a directory with mkdir

    I've not got a solution, mainly 'cos I don't use PERL, but all the references I can find suggest it's a problem with your language settings - and the reference to a "newline" suggest to me that it's reading something as an escaped character.

  6. #6
    JamesonLewis3rd's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2007
    Location
    Arlington TX
    Posts
    11

    Re: Creating a directory with mkdir

    Have you seen this?
    http://alumnus.caltech.edu/~svhwan/prodScript/avoidPwdFindMkdir.html#sec3



Tags for this Thread