#!/usr/bin/perl -w
use strict;
my ($a,$b);
$a=&finding;
sub finding{
my $distfiles;
open(MAKE_CONF,"/etc/make.conf") || die "Can't open /etc/make.conf";
foreach (<MAKE_CONF>){
if(/PORTDIR=(.*)/){
my $port=$1;
print $port;
}
if(/DISTDIR=(.*)/){
my $dist=$1;
}
}
return $port;
}
./main.pl
Global symbol "$port" requires explicit package name at ./main.pl line 21.
Execution of ./main.pl aborted due to compilation errors.
чё за глюки у меня?