@@ -54,9 +54,8 @@ <h1><a href="/2025/03/12/perl-basics-for-rex/">Perl basics for Rex</a></h1>
5454
5555< p > While we provide a < a href ="https://www.rexify.org/docs/guides/just_enough_perl_for_rex.html "> Just enough Perl for
5656Rex</ a > page on
57- the website of < a href ="https://www.rexify.org/ "> Rex, the friendly automation
58- framework</ a > , I often find myself sharing my own
59- experience about getting started with Perl.</ p >
57+ our website, I often find myself sharing my own experience about getting
58+ started with Perl.</ p >
6059
6160< p > I decided to write my own take about the basics from a Rex perspective, and
6261collect further resources I keep recommending or referring to.</ p >
@@ -104,7 +103,7 @@ <h3 id="write-documentation"><a href="#write-documentation">Write documentation<
104103Ordinary paragraph with < span class ="synIdentifier "> B<bold></ span > and < span class ="synIdentifier "> I<italic></ span > text,
105104as well as with < span class ="synIdentifier "> C<inline code></ span > and < span class ="synIdentifier "> L<hyperlink|https://www.example.com></ span > .
106105
107- Command paragraphs treat the test specially and starts with “=”,
106+ Command paragraphs treat the text specially and starts with “=”,
108107like “=pod” above.
109108
110109< span class ="synPreProc "> indent verbatim paragraphs</ span >
@@ -117,13 +116,18 @@ <h3 id="write-documentation"><a href="#write-documentation">Write documentation<
117116 < section id ="section-3 ">
118117 < h2 id ="modules "> < a href ="#modules "> Modules</ a > </ h2 >
119118
120- < p > Modules group together related functionality to reuse elsewhere. See < a href ="https://perldoc.perl.org/perlmod "> perlmod</ a > as a reference.</ p >
119+ < p > Modules group together related functionality to reuse elsewhere. See
120+ < a href ="https://perldoc.perl.org/perlmod "> perlmod</ a > as a reference.</ p >
121121
122122< h3 id ="core-modules "> < a href ="#core-modules "> Core modules</ a > </ h3 >
123123
124- < p > Perl itself comes with a set of modules to reuse common functionality between projects. Use the < a href ="https://metacpan.org/dist/Module-CoreList/view/corelist "> < code > corelist</ code > </ a > command to find more information about the core modules.</ p >
124+ < p > Perl itself comes with a set of modules to reuse common functionality between
125+ projects. Use the
126+ < a href ="https://metacpan.org/dist/Module-CoreList/view/corelist "> < code > corelist</ code > </ a > command
127+ to find more information about the core modules.</ p >
125128
126- < p > For example to list all core modules coming with perl-5.40.1, use < code > corelist -v 5.40.1</ code > on the command line.</ p >
129+ < p > For example to list all core modules coming with perl-5.40.1, use < code > corelist -v
130+ 5.40.1</ code > on the command line.</ p >
127131
128132< p > Import them with the < code > use</ code > function:</ p >
129133
@@ -132,13 +136,18 @@ <h3 id="core-modules"><a href="#core-modules">Core modules</a></h3>
132136
133137< h3 id ="other-modules "> < a href ="#other-modules "> Other modules</ a > </ h3 >
134138
135- < p > The < a href ="https://www.cpan.org/ "> Comprehensive Perl Archive Network (CPAN)</ a > currently hosts the work from 14500+ authors in the form of 45000+ distribution containing 220000+ modules. Some of them likely solves the same problem one has to solve for their own use case.</ p >
139+ < p > The < a href ="https://www.cpan.org/ "> Comprehensive Perl Archive Network (CPAN)</ a >
140+ currently hosts the work from 14500+ authors in the form of 45000+
141+ distributions containing 220000+ modules. Some of them likely solves the same
142+ problem one has to solve for their own use case.</ p >
136143
137- < p > The < a href ="https://metacpan.org/dist/CPAN/view/scripts/cpan "> cpan</ a > client comes with Perl, while CPAN itself supports other clients too, like
144+ < p > The < a href ="https://metacpan.org/dist/CPAN/view/scripts/cpan "> cpan</ a > client comes with
145+ Perl, while CPAN itself supports other clients too, like
138146< a href ="https://metacpan.org/dist/App-cpanminus/view/bin/cpanm "> cpanm</ a > , and
139147< a href ="https://metacpan.org/dist/App-cpm/view/script/cpm "> cpm</ a > .</ p >
140148
141- < p > Use the system package managers or one of those clients to install a distribution from CPAN locally, then reuse the modules:</ p >
149+ < p > Use the system package managers or one of those clients to install
150+ a distribution from CPAN locally, then reuse the modules:</ p >
142151
143152< pre > < code class ="highlight "> < span class ="synStatement "> use </ span > Rex; < span class ="synComment "> # imports the Rex module</ span >
144153</ code > </ pre >
@@ -151,7 +160,7 @@ <h2 id="variables"><a href="#variables">Variables</a></h2>
151160
152161< p > See < a href ="https://perldoc.perl.org/perldata "> perldata</ a > as a reference.</ p >
153162
154- < p > I will use the values from these example below throughout the document .</ p >
163+ < p > I will use the values from the below examples throughout this post .</ p >
155164
156165< h3 id ="naming "> < a href ="#naming "> Naming</ a > </ h3 >
157166
@@ -236,7 +245,8 @@ <h4 id="create-references"><a href="#create-references">Create references</a></h
236245
237246< h4 id ="use-references "> < a href ="#use-references "> Use references</ a > </ h4 >
238247
239- < p > Accordingly, Perl provides two ways to use references too, called dereferencing:</ p >
248+ < p > Accordingly, Perl provides two ways to use references too, called
249+ dereferencing:</ p >
240250
241251< pre > < code class ="highlight "> < span class ="synComment "> # using curly braces</ span >
242252
@@ -261,7 +271,8 @@ <h4 id="use-references"><a href="#use-references">Use references</a></h4>
261271
262272< h3 id ="dump-data-structures "> < a href ="#dump-data-structures "> Dump data structures</ a > </ h3 >
263273
264- < p > Perl comes with the < a href ="https://perldoc.perl.org/Data::Dumper "> Data::Dumper</ a > core module to stringify data structures.</ p >
274+ < p > Perl comes with the < a href ="https://perldoc.perl.org/Data::Dumper "> Data::Dumper</ a > core
275+ module to stringify data structures.</ p >
265276
266277< pre > < code class ="highlight "> < span class ="synStatement "> use </ span > Data::Dumper;
267278
@@ -340,7 +351,8 @@ <h4 id="matching"><a href="#matching">Matching</a></h4>
340351 < section id ="section-6 ">
341352 < h2 id ="loops "> < a href ="#loops "> Loops</ a > </ h2 >
342353
343- < p > Iterate over miltiple values, like arrays and hashes.</ p >
354+ < p > Iterate over data structures with a collection of values, like arrays and
355+ hashes.</ p >
344356
345357< pre > < code class ="highlight "> < span class ="synRepeat "> foreach</ span > < span class ="synStatement "> my</ span > < span class ="synIdentifier "> $project</ span > (< span class ="synIdentifier "> @projects</ span > ) {
346358 < span class ="synStatement "> print</ span > < span class ="synIdentifier "> $project</ span > ; < span class ="synComment "> # prints RexPerl</ span >
0 commit comments