in reply to Re^2: efficient use of subroutines
in thread efficient use of subroutines

In my own view. Subroutines i create for my programs do one thing and do it well. Let the names of your subroutine tell you more about what lies within it and its ultimate function. e.g sub display_data().

Learn to reduce the length of you subroutines try to make them compact and straight to the point. things like first naming your variables before assigning values to them are way too long and repetitive. e.g my $name = undef; $name = qq{liray}
could be reduced to my $name = qq{liray};

Finally clarity, maintenance should be kept in mind, because you could visit this subroutine 6 months down the line and begin to wonder what you created it to do and why. Also learn to express your self in the best possible way that suits your style of programming.