#!/usr/bin/perl -w use strict; use warnings; my $path = "/Krusty/Desktop/Scripte"; my $infile = "testfile.csv"; my @file = (); my $test1 = "KEINE AHNUNG"; open(INPUT, "<$path/$infile") || die "Cannot open file $infile!\n"; while() { chomp($_); push(@file, $_); } close(INPUT); test($test1, @file); sub test { my $next = $_[0]; print $next."\n"; my @neu = @_; foreach my $x (@neu) { print $x."\n"; } }