#!/usr/local/bin/perl -w use strict; our @bundle = ("Datei_1", "Datei2"); for(@bundle){ print "at begining: @bundle\n"; read_my_file($_); } sub read_my_file{ open(MODULES, $_) or die "Can't open $_: $!\n"; print "in subroutine: @bundle","\n"x2; #while(defined(my $line = )){print $line," @bundle\n"; } # geht while(){print "In file: $_","My files: @bundle\n"; } close(MODULES); print "at end of sr: @bundle\n"; } print "@bundle\n$#bundle\n";