On Fri, 30 Apr 2004, Mark Wheeler wrote:

> [snip] In the Volumes directory, it lists the following as the mounted
> folder:
>
> PRINCETON;DELLSERVER
>
> How do I get into the server? The pathway I tried is:
>
> /Volumes/PRINCETON;DELLSERVER/........
>
> That didn't work.

These kinds of things are *always* easier for people to debug when we
can actually see, at a minimum, a sample of the code in question. In
this case, seeing a directory listing wouldn't hurt either:

   $ ls -l /Volumes/

At a guess, the semi-colon may need to be escaped with a backslash.
These shell commands try to show why:

    $ ls -l PR*
    ls: PR*: No such file or directory
    $ touch PRINCETON;DELLSERVER
    bash: DELLSERVER: command not found
    $ ls -l PR*
    -rw-r--r--  1 cdevers  admin    0 Apr 30 23:44 PRINCETON
    $ touch PRINCETON\;DELLSERVER
    $ ls -l PR*
    -rw-r--r--  1 cdevers  admin    0 Apr 30 23:44 PRINCETON
    -rw-r--r--  1 cdevers  admin    0 Apr 30 23:44 PRINCETON;DELLSERVER
    $ rm PR*
    $ touch 'PRINCETON;DELLSERVER'
    $ ls -l PR*
    -rw-r--r--  1 cdevers  admin    0 Apr 30 23:45 PRINCETON;DELLSERVER
    $ rm PR*
    $ touch "PRINCETON;DELLSERVER"
    $ ls -l PR*
    -rw-r--r--  1 cdevers  admin    0 Apr 30 23:46 PRINCETON;DELLSERVER
    $ rm PR*
    $ touch "PRINCETON\;DELLSERVER"
    $ ls -l PR*
    -rw-r--r--  1 cdevers  admin    0 Apr 30 23:46 PRINCETON\;DELLSERVER

See what's going on? With a backslash or quotes, I'm able to create the
file. With no backslash, I create a file with everything up until the
semi-colon as the name; with quotes and a backslash the file ends up
having the literal backslash character.

So, it's hard to say what you need to do without knowing what your code
looks like, but bear in mind that Perl's rules for this kind of thing
will be similar to what the shell is doing here. Just note that you
probably *must* quote the string, or Perl will treat the text as a
bareword and throw ugly warnings & errors at you, so you need some way
of balancing quotes & backslashes appropriately. Make sense?


It may be easier for you to just symlink the semi-colon version of the
name to an easier equivalent:

    $ ln -s /Volumes/PRINCETON\;DELLSERVER /Volumes/dellserver

And things should be much easier in Perl-land after that...



-- 
Chris Devers

Reply via email to