in reply to Re: Win32::daemon and Perl
in thread Win32::daemon and Perl

One could also use forward slashes. DOS and Windows really don't care if the slash is forward or backward. Only some legacy programs assume that filenames can't contain forward slashes, and explicitly check for them instead of just passing them to the API functions.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^3: Win32::daemon and Perl
by almut (Canon) on Jun 04, 2009 at 10:24 UTC
    One could also use forward slashes.

    That's right.  It's even better actually, because in contrast to using single quotes and backslashes, you don't need to remember to take care of the special case when you have a path with a trailing separator, e.g.

    my $dir = 'c:\perl\scripts\'; # wrong my $dir = 'c:\perl\scripts\\'; # ok when last backslash is escaped vs. my $dir = 'c:/perl/scripts/'; # ok my $dir = "c:/perl/scripts/"; # ok