Thread @INC Problem
(17 answers)
Opened by Gast at 2024-04-28 17:00
Klapp bei mir.
a.pl Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #!/usr/bin/perl use strict; use warnings; use 5.024; use utf8; BEGIN { $0 =~ m~(.*)/[^/]+~ || $0 =~ m~(.*)\\[^\\]+~; $1 ? (unshift @INC, $1) : (@INC = reverse @INC); } say "Programm: $0"; say '@INC: '; say for @INC; Auf Debian 12: Code: (dl
)
1 test@debora:~$ perl /media/sf_SHARED/a/a.pl Auf Windows 11: Code: (dl
)
1 T:\>perl X:\media\SHARED\a\a.pl Last edited: 2024-04-28 18:20:39 +0200 (CEST) |