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.

How is Perl's @INC constructed? (aka What are all the ways of affecting where Perl modules are searched for?)

What are all the ways of affecting where Perl modules are searched for? or, How is Perl's @INC constructed? As …

perl perl-module
Programmatically read from STDIN or input file in Perl

What is the slickest way to programatically read from stdin or an input file (if provided) in Perl?

perl stdin
Quickly getting to YYYY-mm-dd HH:MM:SS in Perl

When writing Perl scripts I frequently find the need to obtain the current time represented as a string formatted as …

perl datetime formatting timestamp
Turning multiple lines into one comma separated line

I have the following data in multiple lines: foo bar qux zuu sdf sdfasdf What I want to do is …

linux perl unix sed awk
How do I tell if a variable has a numeric value in Perl?

Is there a simple way in Perl that will allow me to determine if a given variable is numeric? Something …

perl numbers
How can Perl's print add a newline by default?

In Perl most of my print statements take the form print "hello." . "\n"; Is there a nice way to avoid …

perl printing newline
How can I remove text within parentheses with a regex?

I'm trying to handle a bunch of files, and I need to alter then to remove extraneous information in the …

python regex perl
Perl: function to trim string leading and trailing whitespace

Is there a built-in function to trim leading and trailing whitespace such that trim(" hello world ") eq "hello world"?

perl
How can I start an interactive console for Perl?

How can I start an interactive console for Perl, similar to the irb command for Ruby or python for Python?

perl console interactive read-eval-print-loop
Printing everything except the first field with awk

I have a file that looks like this: AE United Arab Emirates AG Antigua & Barbuda AN Netherlands Antilles AS …

perl awk sed