in reply to Re^2: how to write a subroutine content into a file
in thread how to write a subroutine content into a file

Have you read the most basic documentation, perldoc perlsub?

And if that's insufficiently clear, try the subroutine section of Tutorials ...for the content itself, and for the experience of trying to answer your own questions.

  • Comment on Re^3: how to write a subroutine content into a file