sub foo { local ($_); while (<>) { chomp; print "ich habe $_ gelesen\n"; } } foo for $1; print "ende\n";