#!/usr/bin/perl -w use strict; sub one { my $inside=1; sub two { $inside++; my $inner=$inside+1; print "$inside $inner\n"; } print "$inside "; # no return there two(); } two(); two(); two(); one(); two(); &main::one; &main::two; #### prints # 1 2 # 2 3 # 3 4 # 1 2 3 # 3 4 # 1 4 5 # 5 6