----- Original Message ----- 
From: "Ñåðãåé ×åðíèåíêî" <[EMAIL PROTECTED]>

>
> S> First up, which drive contains \includes\28ESP.pl ?
>
>    it is d:\perl_projects\ The file 28esp.pl contains only string "1;"

Ok - so is 28ESP.pl in D:\includes\ or is it in D:\perl_projects\includes\ ?

If it's in D:\perl_projects\includes\ then *obviously* it's not going to
work if you do:

require '\\includes\\28ESP.pl';

because it's not in that location. (But if it's in D:\includes\, then that
will work.)

>
> S> Run this script:
>
> S> use warnings;
> S> use Cwd;
> S> print getcwd(), "\n";
> S> require '\\includes\\28ESP.pl';
> S> __END__
>
>    Output is:
>
> Can't locate \includes\28ESP.pl in @INC (@INC contains:
C:/.ActiveState/GUI_Builder
> C:/Perl/lib C:/Perl/site/lib .) at D:\perl_projects\pw_form.pl line 4.
> D:/perl_projects
>
>    Not so amazing. Single quotes is not interpreted in perl. And no
>    doubt that nobody expect to find directory named '\\includes'.
>    Only 'includes'.

Eh ??? There is no problem with the script I provided, as long as
D:\includes\28ESP.pl exists.

>
> S> If that prints a cwd that begins with the same drive letter that houses
> S> \includes\28ESP.pl && it also produces the error you're claiming it
does
> S> .... then (and only then) will I believe you .... and thank the gods
that I
> S> don't have to use Windows 98.
>
>    I've tried all combinations of quotes (single, double) and
>    separators ( / or \ or \\). The way to eliminate the
>    error is removing of path separator (any of them) from beginning of
>    quoted path or prepending dot to path (resulting in
>    '.\\includes\\28ESP.pl').

The '.' means the current directory.

require '.\\includes\\28ESP.pl';

is the same as:

require 'includes\\28ESP.pl';

is the same as:

require 'D:\\perl_projects\\includes\\28ESP.pl';

is the same as:

require '\\perl_projects\\includes\\28ESP.pl';

is DIFFERENT to:

require '\\includes\\28ESP.pl';

That last incantation is the same as:

require 'D:\\includes\\28ESP.pl';

and both of those last 2 incantations should work if D:\includes\28ESP.pl
exists.

And, in *all* of the above incantations, you could replace the \\ with
either \ or / and it would make no difference. If I had used double quotes,
your choice would be limited to either \\ or / - you couldn't use \.

>On Linux path like this  '/includes/28ESP.pl' isn't relative.is

Nor is a path like '/includes/28ESP.pl' relative on Windows. On both Windows
and linux that's an absolute path. On both Windows and linux a path like
'includes/28ESP.pl' (or './includes/28ESP.pl') *is* relative - it's relative
to the cwd (as you know).

Cheers,
Rob


_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to