Skip to content

Commit 02570f0

Browse files
committed
initial import
0 parents  commit 02570f0

File tree

79 files changed

+12392
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+12392
-0
lines changed

about.tt

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
=title About Perl 5 Maven
2+
=timestamp 2012-05-02T22:45:56
3+
=status show
4+
=showright 1
5+
=newsletter 0
6+
=published 0
7+
=author 0
8+
=index 0
9+
=archive 0
10+
=feed 0
11+
=comments 0
12+
=social 0
13+
14+
15+
<p>
16+
There are people who use Perl for tasks in <b>system administration</b> or in
17+
<b>configuration management</b>.
18+
<br />
19+
Others build <b>web sites</b> or <b>web application</b> using Perl.
20+
</p>
21+
22+
<p>
23+
Yet others only need it for <b>small scripts</b>. Or so they were told.
24+
</p>
25+
26+
<p>
27+
Some people use Perl for <b>Bioinformatics</b> or for some other form of
28+
<b>scientific calculations</b>.
29+
</p>
30+
31+
<p>
32+
There are a lot of people using Perl for <b>test automation</b>.
33+
That's one of my favorite fields.
34+
</p>
35+
36+
<p>
37+
The Perl Maven web site was created for all of these people. It's aim is to
38+
<b>help you get your job done</b>.
39+
</p>
40+
41+
<p>
42+
<b>Learning Perl</b> is a funny thing. On one hand, after a few hours of reading
43+
you can already create small scripts and be productive. On the other hand, even after years
44+
if using Perl daily you will find new things. Either in the language or on CPAN.
45+
The learning curve is flat but long.
46+
</p>
47+
48+
<p>
49+
According to <a href="http://en.wikipedia.org/wiki/Maven">Wikpedia</a>:
50+
<p>
51+
52+
<p>
53+
<b>A maven is a trusted expert in a particular field, who seeks to pass knowledge on to others.</b>
54+
</p>
55+
56+
<p>
57+
My hope is that if you follow the articles of this site, read the books an watch the video lectures
58+
you will constantly improve your Perl expertise. Soon you can <b>become a Perl Maven</b>.
59+
</p>
60+
61+
<p>
62+
The site will contain articles available to all free of charge.
63+
We will have several <a href="/perl-books">Perl books</a> and <a href="/perl-videos">video courses</a> for sale.
64+
</p>
65+
66+
<h2>Versions of Perl</h2>
67+
68+
<p>
69+
I am sure you are wondering what version if Perl I am going to cover. For now I'll stick to Perl 5 and
70+
publish the Perl 6 related articles on my personal site. After all Perl 5 is what is used in production.
71+
Within Perl 5 I'll try to be pragmatic. While I would really like to see more people move forward and use the newest releases
72+
of perl I have to be realistic. In many companies that's impossible. I'll try to make sure the solutions I show can work on
73+
the perl 5.8 family but I'll point out when it is necessary to use a newer version of Perl.
74+
</p>
75+
<p>
76+
You will see how using a newer version of Perl can improve your code and you will also see how to reach the point that you can use that Perl.
77+
</p>
78+
79+
<h2>About the author/editor</h2>
80+
81+
<p>
82+
I am <a href="http://szabgab.com/">Gabor Szabo</a>,
83+
long time Perl developer and Perl trainer.
84+
<br>
85+
<center><img src="/img/szabgab.png" alt="Gabor Szabo" /></center>
86+
<br />
87+
The original creator of <a href="http://padre.perlide.org/">Padre, the Perl IDE</a>,
88+
the curator of the <a href="http://perlweekly.com/">Perl Weekly newsletter</a>
89+
and recipient of the White Camel award of the Perl community.
90+
</p>
91+
92+
<h2>People helping</h2>
93+
94+
<p>
95+
There are a number of people who help with the content of the Perl Maven site. In no particular order and without
96+
listing all the people:
97+
</p>
98+
<ul>
99+
<li><a href="http://ca.linkedin.com/pub/darin-mcbride/32/a53/184">Darin McBride</a></li>
100+
<li><a href="http://twitter.com/Smylers2">Smylers</a></li>
101+
<li><a href="http://uk.linkedin.com/in/aaroncrane">Aaron Crane</a></li>
102+
<li><a href="http://www.shlomifish.org/">Shlomi Fish</a></li>
103+
</ul>
104+
105+
106+
<h2 id="contact">Contact information</h2>
107+
<p>
108+
E-mail: gabor@szabgab.com
109+
110+
Mobile phone: +972-54-4624648
111+
</p>
112+
113+
<p>
114+
If you are interested in the solutions that are published here, please
115+
sign up to our newsletter. You'll be notified when a new article is published
116+
and you will also get a copy of the <a href="/perl-maven-cookbook">Perl Maven Cookbook</a>.
117+
</p>
118+

advanced-perl-maven-e-book.tt

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
=title Advanced Perl Maven book
2+
=timestamp 2012-07-26T11:45:56
3+
=description Advanced level, book for people who would like to improve their Perl programming skills
4+
=tags training, course, advanced, e-book
5+
=status show
6+
=showright 0
7+
=newsletter 0
8+
=published 0
9+
=author 0
10+
=index 0
11+
=archive 0
12+
=feed 0
13+
=comments 0
14+
=social 0
15+
16+
17+
<div class="btn"><a href="/buy?product=advanced_perl_maven_ebook">Buy for $16</a></div>
18+
19+
Reading this <b>Advanced Perl book</b> will teach you how to create modules and classes
20+
and in general how to write and maintain advanced Perl code.
21+
22+
It will teach you how to write Object Oriented code in the modern way, using <b>Moose</b>,
23+
or by using only core Perl: manually blessing references.
24+
25+
While many people use Perl as procedural language with Object Oriented features,
26+
Perl also has capabilities to use it as a functional programming language.
27+
This book will teach you a number of such techniques.
28+
29+
It is based on many years of experience teaching Perl,
30+
blended with the modern features of Perl and CPAN.
31+
32+
<h2>Table of Content</h2>
33+
<ul>
34+
<li>Using CPAN in an advanced way (changing @INC, using local::lib etc.)</li>
35+
<li>References
36+
<ul>
37+
<li>handling mult-dimensional, complex data structures</li>
38+
<li>Reference counting</li>
39+
<li>Debugging data structures</li>
40+
<li>Anonymous arrays and hashes</li>
41+
<li>Subroutine references</li>
42+
<li>Dispatch tables</li>
43+
<li>Handling memory leak</li>
44+
<li>Deep copy of data structures</li>
45+
<li>Closures</li>
46+
<li>Creating a caching system</li>
47+
<li>Signal handling</li>
48+
<li>Handling warnings in the code</li>
49+
<li>grep, map</li>
50+
<li>Array and hash slices</li>
51+
<li>Creating context sensitive functions using wantarray.</li>
52+
<li>Improving speed by using the Schwartzian transformation</li>
53+
</ul></li>
54+
<li>Libraries and Modules, Package and Namespace
55+
<ul>
56+
<li>Using namespaces for cleaner code</li>
57+
<li>Creating a module</li>
58+
<li>Exporting functions automatically and on-demand</li>
59+
<li>use, require and import</li>
60+
<li>Packaging modules for distribution</li>
61+
<li>Writing unit tests</li>
62+
<li>Exception handling</li>
63+
</ul></li>
64+
<li>Object Oriented Programming in Perl (with and without Moose)
65+
<ul>
66+
<li>Constructor</li>
67+
<li>Attributes, attribue types</li>
68+
<li>Create your own type</li>
69+
<li>Getters/Setters</li>
70+
<li>Inheritance</li>
71+
<li>Encapsulation</li>
72+
<li>Singleton</li>
73+
<li>Destructor</li>
74+
</ul>
75+
</li>
76+
</ul>
77+
78+
By purchasing the e-book you get unlimited updates as new editions are published!
79+
80+
The full price of the e-book is going to be $35. You can now buy it for an introductory price of $16 only.
81+
82+
And still get the lifetime updates.
83+
84+
Currently it is available in PDF format and contains 171 pages. Other formats will be
85+
added later and will be available without additional payment.
86+
87+
<div class="btn"><a href="/buy?product=advanced_perl_maven_ebook">Buy for $16</a></div>
88+
89+
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
=title Advanced Perl Maven video course
2+
=timestamp 2012-07-17T11:45:56
3+
=description Advanced level, online video training course for people who would like to improve their Perl programming skills
4+
=tags training, course, advanced, video
5+
=status show
6+
=showright 0
7+
=newsletter 0
8+
=published 0
9+
=author 0
10+
=index 0
11+
=archive 0
12+
=feed 0
13+
=comments 0
14+
=social 0
15+
16+
17+
This <b>Advanced Perl training course</b>
18+
will allow you to create modules, classes. To write
19+
Object Oriented code in the modern way, using <b>Moose</b>,
20+
and by using only core Perl, manually blessing references.
21+
22+
It is based on many years of experience teaching Perl,
23+
blended with the modern features of Perl and CPAN.
24+
25+
Taking this course will help you maintain existing code and
26+
it will teach you how to use modern Perl tools to write new,
27+
<b>nice and maintainable Perl code</b>.
28+
29+
30+
<h2>Table of Content</h2>
31+
<ul>
32+
<li>References</li>
33+
<li>Libraries and Modules, Package and Namespace</li>
34+
<li>Packaging modules for distribution</li>
35+
<li>Object Oriented Programming in Perl (with and without Moose)</li>
36+
</ul>
37+
38+
By purchasing the video you get unlimited updates as new editions are published!
39+
40+
<table border="1">
41+
<tr><td>What</td><td>Details</td><td>Price</td></tr>
42+
<tr><td>Video course</td><td> 84 screencasts,<br /> a total of more than 2 hours of screencasts<br />+ explanation of
43+
the solutions.</td><td><div class="btn"><a href="http://ude.my/vtoOgj">Buy for $69</a></div></td></tr>
44+
</table>
45+
46+
<h2>What do people say?</h2>
47+
48+
<code>
49+
Just watched the Advanced Perl Maven - Online video course by @szabgab.
50+
Fantastic value, great course. ++.
51+
</code>
52+
53+
<a href="http://twitter.com/#!/marksmith">Mark Smith</a>
54+
55+
<code>
56+
@szabgab oh cool thanks! im recommending it to my boss too so
57+
he can better appreciate the work i do :)
58+
59+
@szabgab hah! im also getting it for myself too.. need to fill in the
60+
blanks in my perl knowledge. thanks for making your tutorials availabl
61+
@szabgab just got all 3 courses! btw i found you through youtube when
62+
i was looking for help using perl Dancer and found your blog tutorial.
63+
</code>
64+
65+
<a href="http://twitter.com/#!/captain_fwiffo">Captain Fwiffo</a>
66+

appending-to-files.tt

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
=title Appending to files
2+
=timestamp 2013-03-15T07:30:01
3+
=indexes files, append, open, >>
4+
=status show
5+
=books beginner_book
6+
=author szabgab
7+
=index 1
8+
=archive 1
9+
=feed 1
10+
=comments 1
11+
=social 1
12+
13+
=abstract start
14+
15+
In this episode of the <a href="/perl-tutorial">Perl tutorial</a> we are going to see <b>how to append to files using Perl</b>.
16+
17+
In the previous episode we learned <a href="/writing-to-files-with-perl">how to write to files</a>.
18+
That's good when we are creating a file from scratch, but there are cases when you would rather keep the original file,
19+
and only add lines to the end.
20+
21+
The most prominent case is when you are writing a log file.
22+
23+
=abstract end
24+
25+
Calling
26+
27+
<code lang="perl">
28+
open(my $fh, '>', 'report.txt') or die ...
29+
</code>
30+
31+
Opening a file for writing using the <hl>></hl> sign will delete the content of the file if it had any.
32+
33+
If we would like to <b>append</b> to the end of the file we use <b>two greater-than</b> signs <hl>>></hl> as in this example:
34+
35+
<code lang="perl">
36+
open(my $fh, '>>', 'report.txt') or die ...
37+
</code>
38+
39+
Calling this function will open the file for appending. that means the file will remain intact
40+
and anything your <hl>print()</hl> or <hl>say()</hl> to it will be added to the end.
41+
42+
The full example is this:
43+
44+
<code lang="perl">
45+
use strict;
46+
use warnings;
47+
use 5.010;
48+
49+
my $filename = 'report.txt';
50+
open(my $fh, '>>', $filename) or die "Could not open file '$filename' $!";
51+
say $fh "My first report generated by perl";
52+
close $fh;
53+
say 'done';
54+
</code>
55+
56+
If you run this script several times, you will see that the file is growing.
57+
Every run of the script will add another row to the file.
58+
59+

archive.tt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
=title Perl 5 Maven archive
2+
=timestamp 2012-05-02T22:45:56
3+
=status show
4+
=showright 1
5+
=newsletter 0
6+
=published 0
7+
=author 0
8+
=index 0
9+
=archive 0
10+
=feed 0
11+
=comments 0
12+
=social 0
13+
14+
Some of the content is still on <a href="http://szabgab.com/blog.html">szabgab.com</a>,
15+
but the Perl 5 related articles will be moved here.
16+

0 commit comments

Comments
 (0)