Gang Of Coders
Home
About Us
Contact Us
All Perl Solutions on Gang of Coders
Total of 193 Perl Solutions
Why is XML::Simple Discouraged?
Xml
Perl
Xml Simple
How do you capture stderr, stdout, and the exit code all at once, in Perl?
Perl
Stdout
Exit Code
How do I get the length of a string in Perl?
Perl
String
How can I use a variable in the replacement side of the Perl substitution operator?
Regex
Perl
Substitution
How can I see if a Perl hash already has a certain key?
Perl
Hash
Key
Lookup
In Perl, is it better to use a module than to require a file?
Perl
How can I run a Perl script on Mac OS X?
Perl
Macos
Mac OS: /usr/bin/env: bad interpreter: Operation not permitted
Macos
Perl
Bash
Command Line-Interface
Env
How to decrypt hash stored by bcrypt
Perl
Bcrypt
How can I require an optional Perl module if installed?
Perl
Module
Require
Should we hire someone who writes C in Perl?
Perl
How can I compile my Perl script so it can be executed on systems without 'perl' installed?
Perl
What should I use for a Perl script's shebang line?
Perl
Shebang
How do I break out of a loop in Perl?
Perl
Loops
Break
Strict
Are Perl regexes turing complete?
Regex
Perl
Turing Complete
Why is `\s+` so much faster than `\s\s*` in this Perl regex?
Regex
Perl
Regex Greedy
"Variable length lookbehind not implemented" but it isn't variable length
Regex
Perl
Character Translation using Python (like the tr command)
Python
Perl
Tr
Transliteration
Neatest way to remove linebreaks in Perl
Perl
Line Breaks
In Perl, is there a built in way to compare two arrays for equality?
Arrays
Perl
Compare
Match
How to properly deobfusacte a Perl script?
Perl
Deobfuscation
What is the best way to slurp a file into a string in Perl?
Perl
String
File Io
File
How do I find a user's home directory in Perl?
Perl
Home Directory
Tilde Expansion
Python for a Perl programmer
Python
Perl
How to get the name of Perl script that is running
Perl
How to check if a Perl script doesn't have any compilation errors?
Perl
Compilation
When should I use the & to call a Perl subroutine?
Perl
Subroutine
How can I start an interactive console for Perl?
Perl
Console
Interactive
Read Eval-Print-Loop
How can I find the number of keys in a hash in Perl?
Perl
Hash
Should I use YAML or JSON to store my Perl data?
Perl
Json
Yaml
Negative regex for Perl string pattern match
Regex
Perl
Perl - If string contains text?
String
Perl
String Matching
Today's Date in Perl in MM/DD/YYYY format
Perl
Date
Formatting
Why is this regular expression so slow in Java?
Java
Python
Regex
Performance
Perl
How do I convert a date/time to epoch time (unix time/seconds since 1970) in Perl?
Perl
Datetime
Parsing
Date
Time
Is there a better way to determine elapsed time in Perl?
Perl
Time
How do I include a Perl module that's in a different directory?
Perl
Module
What is the difference between parent and base in Perl 5?
Perl
Subclass
Pragma
What is the difference between "||" and "or" in Perl?
Perl
Operators
What is the difference between `$this`, `@that`, and `%those` in Perl?
Perl
Types
Sigils
Usage of ‘if’ versus ‘unless’ for Perl conditionals
Perl
If Statement
Readability
Regex Group in Perl: how to capture elements into array from regex group that matches unknown number of/multiple/variable occurrences from a string?
Regex
Perl
Grouping
Match
Tips for keeping Perl memory usage low
Perl
Memory
Variable-length lookbehind-assertion alternatives for regular expressions
Php
Javascript
Python
Regex
Perl
Perl subroutine arguments
Perl
Regex to match any character including new lines
Regex
Perl
What are the differences between Perl, Python, AWK and sed?
Python
Perl
Sed
Awk
Language Comparisons
How can I check if a Perl array contains a particular value?
Perl
Arrays
Comparison
Find size of an array in Perl
Perl
What's the difference between Perl's backticks, system, and exec?
Perl
How do I use boolean variables in Perl?
Perl
Boolean
How can I quickly sum all numbers in a file?
Linux
Perl
Bash
Shell
Awk
What's the easiest way to install a missing Perl module?
Perl
Module
Cpan
How is Perl's @INC constructed? (aka What are all the ways of affecting where Perl modules are searched for?)
Perl
Perl Module
What is the difference between 'my' and 'our' in Perl?
Perl
Scope
How do I perform a Perl substitution on a string while keeping the original?
Regex
Perl
Replace
How do I compare two strings in Perl?
Perl
String Comparison
How do you round a floating point number in Perl?
Perl
Floating Point
Rounding
How can I print the contents of a hash in Perl?
Perl
Hash
Printing
Seeking clarification on apparent contradictions regarding weakly typed languages
C#
Java
Python
Perl
Weakly Typed
How do I get the full path to a Perl script that is executing?
Perl
Path
Location
How can I delete a newline if it is the last character in a file?
Linux
Perl
Shell
Awk
Sed
Rename Files and Directories (Add Prefix)
Linux
Perl
Shell
How do I remove duplicate items from an array in Perl?
Perl
Arrays
Unique
Duplicates
while (1) Vs. for (;;) Is there a speed difference?
C++
Perl
Optimization
Performance
How to fix a locale setting warning from Perl
Perl
Locale
What exactly does Perl's "bless" do?
Perl
Bless
Best way to give a variable a default value (simulate Perl ||, ||= )
Php
Perl
Operators
Default Value
How do I update all my CPAN modules to their latest versions?
Perl
Cpan
Hidden features of Perl?
Perl
Hidden Features
How can I pass command-line arguments to a Perl program?
Perl
Command Line
How to match any non white space character except a particular one?
Regex
Perl
How do I enter a multi-line comment in Perl?
Perl
Comments
Multiline
Perl Data-Structures
Check whether a string contains a substring
String
Perl
String Matching
In Perl, how can I read an entire file into a string?
String
Perl
Slurp
Why does modern Perl avoid UTF-8 by default?
Perl
Unicode
Utf 8
Escaping a forward slash in a regular expression
Regex
Perl
Escaping
How can I output UTF-8 from Perl?
Perl
Unicode
Utf 8
How do I tell CPAN to install all dependencies?
Perl
Dependencies
Cpan
Perl flags -pe, -pi, -p, -w, -d, -i, -t?
Perl
Command Line
Flags
grep -P no longer works. How can I rewrite my searches?
Macos
Perl
Shell
How can I check if a file exists in Perl?
Perl
Why are Perl 5's function prototypes bad?
Perl
Function
Prototype
Should I choose ActivePerl or Strawberry Perl for Windows?
Windows
Perl
Strawberry Perl
Activeperl
What's the safest way to iterate through the keys of a Perl hash?
Perl
Hash
Iteration
Each
Why use strict and warnings?
Perl
How to extract string following a pattern with grep, regex or perl
Regex
Perl
Sed
Html Parsing
Text Extraction
What is the proper way to check if a string is empty in Perl?
Perl
String
Comparison
Best way to iterate through a Perl array
Arrays
Perl
Iteration
Differences between Perl and PHP
Php
Perl
Why is this program valid? I was trying to create a syntax error
Perl
How can I combine hashes in Perl?
Perl
Dictionary
Hash
Merge
How can Perl's print add a newline by default?
Perl
Printing
Newline
How can I troubleshoot my Perl CGI script?
Perl
Cgi
How to reliably guess the encoding between MacRoman, CP1252, Latin1, UTF-8, and ASCII
Java
Python
Perl
Macos
Character Encoding
What is the meaning of @_ in Perl?
Perl
Variables
Which version of Perl should I use on Windows?
Windows
Perl
Debugging
Strawberry Perl
Easy way to print Perl array? (with a little formatting)
Perl
How are nested capturing groups numbered in regular expressions?
Java
.Net
Regex
Perl
Language Agnostic
How do I get a list of installed CPAN modules?
Perl
Cpan
How should I use the "my" keyword in Perl?
Perl
Scope
Declaration
How to match a substring in a string, ignoring case
Python
Perl
Turning multiple lines into one comma separated line
Linux
Perl
Unix
Sed
Awk
How do I tell if a variable has a numeric value in Perl?
Perl
Numbers
How can I convert a string to a number in Perl?
String
Perl
Floating Point
How do I daemonize an arbitrary script in unix?
Perl
Unix
Scripting
Sysadmin
Daemon
How can I remove text within parentheses with a regex?
Python
Regex
Perl
What are the Python equivalents to Ruby's bundler / Perl's carton?
Python
Ruby
Perl
Virtualenv
Pip
How to efficiently calculate a running standard deviation
Python
Perl
Statistics
In Perl, what is the difference between a .pm (Perl module) and .pl (Perl script) file?
Perl
Perl Module
Regular expression to validate username
Java
Php
Html
Regex
Perl
Use of 'use utf8;' gives me 'Wide character in print'
Perl
Unicode
Utf 8
In Perl, how can I concisely check if a $variable is defined and contains a non zero length string?
Perl
String
Perl build, unit testing, code coverage: A complete working example
Perl
Unit Testing
Build Process
Build Automation
Code Coverage
Perl: function to trim string leading and trailing whitespace
Perl
Why don't I get any syntax errors when I execute my Python script with Perl?
Python
Perl
How can I use CPAN as a non-root user?
Perl
Cpan
What is the best way to delete a value from an array in Perl?
Arrays
Perl
Is there a Perl shortcut to count the number of matches in a string?
Arrays
Regex
Perl
Perl4
In Perl, how do I create a hash whose keys come from a given array?
Arrays
Perl
Hash
How do I sleep for a millisecond in Perl?
Perl
Sleep
Multiline search replace with Perl
Perl
How can I de-install a Perl module installed via `cpan`?
Perl
Module
Cpan
The recognizing power of "modern" regexes
Regex
Perl
Theory
Context Free-Grammar
Language Theory
String compare in Perl with "eq" vs "=="
String
Perl
What does the <<'m'=~m>> syntax mean in perl?
Perl
How to print lines between two patterns, inclusive or exclusive (in sed, AWK or Perl)?
Shell
Perl
Awk
Sed
Pattern Matching
Command line: search and replace in all filenames matched by grep
Linux
Perl
Awk
Sed
Grep
Programmatically read from STDIN or input file in Perl
Perl
Stdin
How do I enable automatic folds in Vim?
Javascript
Perl
Vim
Folding
Perl: if ( element in list )
Perl
Arrays
Find everything between two XML tags with RegEx
Java
Php
Regex
Xml
Perl
Automatically get loop index in foreach loop in Perl
Perl
Foreach
"inappropriate ioctl for device"
Perl
Ioctl
Quickly getting to YYYY-mm-dd HH:MM:SS in Perl
Perl
Datetime
Formatting
Timestamp
Is there any use for Bash scripting anymore?
Python
Perl
Bash
Scripting
Comparison
How can I call a shell command in my Perl script?
Perl
Is Try::Tiny still recommended for exception handling in Perl 5.14 or later?
Perl
Exception Handling
Text processing - Python vs Perl performance
Python
Regex
Performance
Perl
Text Processing
What does shift() do in Perl?
Perl
Built In
How do I include functions from another file in my Perl script?
Perl
Include
how to remove the first two columns in a file using shell (awk, sed, whatever)
Perl
Shell
Awk
Sed
Cut
How can I install a specific version of a set of Perl modules?
Perl
Version
Module
Cpan
What does $1 mean in Perl?
Regex
Perl
How can I get a call stack listing in Perl?
Perl
Stack Trace
Callstack
What is the difference between my and local in Perl?
Perl
Scoping
Which cpan installer is the right one? (CPAN.pm/CPANPLUS/cpanminus)
Perl
Cpan
Installing modules using Strawberry Perl
Windows
Perl
Cpan
Perl Module
Strawberry Perl
How to replace a string in an existing file in Perl
Regex
Perl
How can I check if a Perl module is installed on my system from the command line?
Perl
Command Line
Perl Module
How can I install and use ack library on Windows?
Windows
Perl
Ack
How can I store regex captures in an array in Perl?
Regex
Perl
Arrays
Submit form and stay on same page?
Javascript
Html
Perl
How do I get a file's last modified time in Perl?
Perl
File Io
Perl read line by line
Perl
What's the difference between exists and defined?
Perl
How to match once per file in grep?
Regex
Perl
Shell
Unix
Grep
Why learn Perl, Python, Ruby if the company is using C++, C# or Java as the application language?
C#
Java
Python
Ruby
Perl
How can I do unit testing in Perl?
Perl
Unit Testing
Testing
How do I tell what type of value is in a Perl variable?
Perl
Using output from a previous job in a new one in a GitHub Action
Perl
Github Actions
How can I repeat a string N times in Perl?
String
Perl
Operators
Repeat
How can I install a CPAN module into a local directory?
Perl
Module
Installation
Cpan
Match whitespace but not newlines
Regex
Perl
What's the difference between a hash and hash reference in Perl?
Perl
Hash
Language Features
Hash Reference
How can I list all of the files in a directory with Perl?
Perl
Directory
How can I elegantly call a Perl subroutine whose name is held in a variable?
Perl
Why are scripting languages (e.g. Perl, Python, and Ruby) not suitable as shell languages?
Python
Ruby
Perl
Bash
Shell
How do I "use" a Perl module in a directory not in @INC?
Perl
Module
Relative Path
Converting relative path into absolute path?
Perl
Unix
Shell
Path
Absolute Path
Perl 5.20 and the fate of smart matching and given-when
Perl
Smartmatch
How can I find the version of an installed Perl module?
Perl
Module
Version
Cpan
How should I do integer division in Perl?
Perl
Integer Division
What regex can match sequences of the same character?
Regex
Perl
What reasons are there to prefer glob over readdir (or vice-versa) in Perl?
Perl
Glob
Readdir
What does "0 but true" mean in Perl?
Perl
Integer
Boolean
How can I use a variable for a regex pattern without interpreting meta characters?
Regex
Perl
Python slow read performance issue
Python
Performance
Perl
Io
How can I detect the operating system in Perl?
Perl
Cross Platform
Does Perl have an enumeration type?
Perl
Enums
How to see if a directory exists or not in Perl?
Perl
File Io
Directory
What's the difference between Carp/Croak, Cluck/Confess, and verbose options?
Perl
Error Handling
Carp
How can my Perl script find its module in the same directory?
Perl
Module
Directory
How can I run a Perl script as a system daemon in linux?
Linux
Perl
Startup
Daemon
Shutdown
Should I use \d or [0-9] to match digits in a Perl regex?
Regex
Perl
How can I find out where a Perl module is installed?
Perl
Path
Module
Config
How to implement an IMP function that returns a large struct type determined at run-time?
Objective C
Perl
Objective C-Runtime
Why is "!!" considered bad form in Perl?
Perl
Boolean
Type Conversion
What are your suggestions for an ideal Vim configuration for Perl development?
Perl
Vim
Configuration
How can I tell if a Perl module is core or part of the standard install?
Perl
Module
Standard Library
how to check if a hash is empty in perl
Perl
Hash
Does python have a "use strict;" and "use warnings;" like in perl?
Python
Perl
Warnings
Strict
"vertical" regex matching in an ASCII "image"
Php
.Net
Regex
Perl
Pcre