perl -le'$s=sub{sprintf"this is from %d\n\n",shift};print $s->($_) for 100,200,300'