in reply to Re: use File::Basename - need to specify OS?
in thread use File::Basename - need to specify OS?

Just a clarification...where is your file coming from? In my case, the file that's chosen for upload comes from a Windows machine. The script is run on a bsd-powered server.
  • Comment on Re: Re: use File::Basename - need to specify OS?

Replies are listed 'Best First'.
Re: use File::Basename - need to specify OS?
by b10m (Vicar) on Apr 21, 2004 at 09:01 UTC

    My "file" is coming from your code, where you state "# $file set to 'C:/Windows/images/hello.gif'". I presume, now, that you mean 'C:\Windows\images\hello.gif', which indeed will fail, cause of the backslashes. (foo\bar can be a valid filename under *NIX)

    --
    b10m

    All code is usually tested, but rarely trusted.
      Ah, I see. I made a mistake there and have corrected it. It should have been '\' instead of '/'. I tried your code but it returned undef...