Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: A bug in PERL or a bug in the server?

by rdw (Curate)
on Nov 20, 2000 at 18:20 UTC ( #42492=note: print w/replies, xml ) Need Help??


in reply to A bug in PERL or a bug in the server?

Sounds to me like you've created a directory with a newline character ("\n") in it. You should use something like chomp to strip off the newline after you've read it in and before you give it to mkdir.

It probably didn't happen with the second one because there wasn't a newline at the end of the text file.

Have fun,

rdw

  • Comment on Re: A bug in PERL or a bug in the server?

Replies are listed 'Best First'.
Re: Re: A bug in PERL or a bug in the server?
by snax (Hermit) on Nov 20, 2000 at 18:45 UTC
    Ahh, yes, that would make more sense -- the chmod command wouldn't be creating directories, would it?

    Anyway, to help you clean up what you've created, try to capture the directory name with a glob from the shell, like ls *dirname* to see if it will list it, then rm -ri *dirname* to delete it (substituting whatever glob you use to find the directory, naturally).

      Actually, I tried and failed to get my shell to let me delete a directory with a "\n" in it....

      ...but of course, since perl created the directory, it can remove it as well.

      DaWolf - it's probably easiest to just change the script to use rmdir to undo the 'damage' before you fix the chomp bug

      Have fun,

      rdw

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://42492]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2021-01-28 12:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?