Nachtrag: ...
Script 1:
#!/usr/bin/perl -w
use strict;
our $x = "10";
require "2.pl";
print "\nVorbei";
Script 2:
#!/usr/bin/perl -w
use strict;
$main::x;
$x += 5;
print "\n$x";
So tut es aber auch nicht ...
Fehler:
Name "main::x" used only once: possible typo at E:\Proggen\Perl\1.pl line 5.
Variable "$x" is not imported at 2.pl line 4.
Variable "$x" is not imported at 2.pl line 5.
Global symbol "$x" requires explicit package name at 2.pl line 4.
Global symbol "$x" requires explicit package name at 2.pl line 5.
Compilation failed in require at E:\Proggen\Perl\1.pl line 6.
Hmmm ?!?!?
cu
alligator