#!/usr/bin/perl use strict; use warnings; sub hauptsub { print "foobar\n"; } { package test2; require 'test2.pl'; } sub test { print "foo\n"; } test(); test2::test();