#!/usr/bin/perl use strict; use warnings; my $i=5; &test($i); sub test{ print 'rechnen in der for-schleife: ',$_+$_,"\n" for(1..shift); }