Top "Perl" questions

Perl is a procedural, high-level, general-purpose, dynamic programming language, known for its native support of regular expressions and string parsing capabilities.

Command line: search and replace in all filenames matched by grep

I'm trying to search and replace a string in all files matched by grep: grep -n 'foo' * will give me …

linux perl awk sed grep
How to compile a Perl script to a Windows executable with Strawberry Perl?

What would be the easiest way to compile a simple Perl script to an executable under Windows with Strawberry Perl (…

perl strawberry-perl perl2exe
Why does modern Perl avoid UTF-8 by default?

I wonder why most modern solutions built using Perl don't enable UTF-8 by default. I understand there are many legacy …

perl unicode utf-8
What exactly does Perl's "bless" do?

I understand one uses the "bless" keyword in Perl inside a class's "new" method: sub new { my $self = bless { }; return $…

perl bless
How can I de-install a Perl module installed via `cpan`?

I am using Perl running in user space (not installed via root) and installing modules via the command-line cpan. I …

perl module cpan
In Perl, what is the difference between a .pm (Perl module) and .pl (Perl script) file?

What is the Difference between .pm (Perl module) and .pl (Perl script) file? Please also tell me why we return 1 …

perl perl-module
How can I combine hashes in Perl?

What is the best way to combine both hashes into %hash1? I always know that %hash2 and %hash1 always have …

perl dictionary hash merge
How can I sort a Perl hash on values and order the keys correspondingly (in two arrays maybe)?

In Perl, I want to sort the keys of a hash by value, numerically: { five => 5 ten => 10 one => 1 …

perl sorting hash perl-hash
How do I tell CPAN to install all dependencies?

How do I tell CPAN to install all dependencies? I tried setting these in cpan: cpan> o conf prerequisites_…

perl dependencies cpan
Perl: if ( element in list )

I'm looking for presence of an element in a list. In Python there is an in keyword and I would …

perl arrays