Questions tagged [perl]

Perl is a portable general-purpose dynamic programming language. It is used in a diverse variety of domains: system management scripting, text processing, web content management, Biology calculations, and others. It has a rich library of free reusable modules - the CPAN and a vibrant community of users and developers.

Perl is a portable general-purpose dynamic programming language. It is used in a diverse variety of domains: system management scripting, text processing, web content management, Biology calculations, and others.

Perl has a rich library of free reusable modules called "CPAN", and a vibrant community of users and developers.

Perl's original description from the Perl documentation:

Perl is a language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports based on that information. It's also a good language for many system management tasks. The language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal).

The CPAN is Perl's module repository and is where users should turn first for code that implements solutions to already-solved problems.

69 questions
77
votes
19 answers

Is Perl still a useful, viable language?

I know it may have been asked before, but here goes nothing... Is Perl still something that would be considered useful? If someone was a new programmer (either completely new to programming or just a few month/years of experience) would Perl be…
Bob
  • 2,790
18
votes
2 answers

Why is Perl 5's smart-match operator considered broken?

I've seen a number of comments across the web Perl's smart-match operator is broken. I know it originally was part of Perl 6, then was implemented in Perl 5.10 off of an old version of the spec, and was then corrected in 5.10.1 to match the current…
Sean McMillan
  • 5,074
  • 25
  • 26
17
votes
7 answers

When should I use Perl's DBIx::Class?

DBIx::Class is a popular Perl interface to any database that you can connect to through DBI. There is good documentation for its technical details, but scant information about its proper use (including the situations where you probably don't want…
brian d foy
  • 1,962
13
votes
5 answers

Should Perl scripts really have no extension?

I just began reading O'Reilly's Learning Perl, 6th Edition and was surprised when I came across this excerpt. #!/usr/bin/perl print "Hello, world!\n"; Let’s imagine that you’ve typed that into your text editor. (Don’t worry yet about what the…
Jared
  • 483
  • 1
  • 5
  • 11
3
votes
2 answers

Is it better to use $filehandler or FILEHANDLER?

It seems like FILEHANDLER is more commonly used as a handler naming convention than $filehandler. But it can give a bareword error if one forgets to use *FILEHANDLER in some constructions. What are advantages and disadvantages of HANDLERS and…
ludwika
  • 73
2
votes
1 answer

is it possible to monitor more than one stream simultanously?

E.g. - $stream1 is the STDOUT of a child process and $stream2 is the STDERR of the same child process - $stream1 is one child process and $stream2 is another child process Is there a possiblility in perl to monitor two or more streams at the same…
ludwika
  • 73
1
vote
2 answers

Should you ever mix scalar and list contexts anyway?

I have decided to learn Perl as my next language and I am currently reading about the scalar and list contexts, although this question is not specifically Perl-related, I will just put it in a Perl context (hah, get it?!) So, the basic idea is that…
0
votes
1 answer

How can I handle errors in functions

I'm programming a web app using Perl and Dancer. The logic is not trivial and I want to separate the web page logic (inside Dancer routes) from the business logic that reads and writes from the database. The business logic is going to be stored in…
celticman
  • 11
  • 3
0
votes
1 answer

Why Perl is appropriate language for CGI?

I heard many people around still saying Perl is great language for CGI. But i think it is not as much as popular as now growing languages such as Python, Ruby. Is there any solid reason for Perl still being the appropriate language for CGI.