in reply to Re^2: regex die?
in thread regex die?

Six of one, a half dozen of the other unless /path/to/file contains spaces. It easily could, of course, but I mainly work on Unix-like systems so it is a bit of a blind spot with me :-)

Cheers

JohnGG

Replies are listed 'Best First'.
Re^4: regex die?
by GrandFather (Saint) on Mar 19, 2006 at 23:58 UTC

    OP did include a space in his match set and also \, both of which are a bit of a hint. :)

    I was under the impression the *nix could handle spaces in directories/file names in any case - it's just that because no one much uses them, *nix applications are even worse at being robust against spaces than Windows applications are.

    /me puts his stiring stick back in the corner. :)


    DWIM is Perl's answer to Gödel
Re^4: regex die?
by ayrnieu (Beadle) on Mar 19, 2006 at 23:57 UTC
    Alas, paths come with spaces even on unix.
      They can come with all sorts of interesting characters, even non-printing ones which makes the output of ls interesting. What I mean is, you don't normally create files with spaces when footling around in the shell so it is less likely that you will have a /path/to/script with spaces. You often get paths with spaces on partitions that have been Samba shared to MS Windows boxes, "New Folder" being prevalent :-(

      Cheers,

      JohnGG