I just found Data::Section and I got interested in it. Unfortunately, I simply cannot get the package Letter::Resignation example on that page to run.
Are there any working examples of Data::Section out there?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well, after some not-so-trivial searching on the net, I finally managed to find the one (and only, I guess) example on the net that I could read here:
That finally explained to me how to set up the Data::Section – the trick is it always needs a package name reference. And finally, for expanding variables in the section, How can I expand variables in text strings? – perlmonks.org was very useful.
So here is an MWE if you do not want to use a package name:
If you use a package name, just a slight difference:
In both case, the terminal output is:
Hope this helps someone – cheers!