Problem Here is the function which does exactly what is specified by its name: sub runCmd_getStdoutStderrAndExitCode(@) { my @cmd = […]
Tag: perl
Perl script to match case law references
Problem I am very new to Perl and decided to work on a simple script that could solve a problem […]
Perl module validate quoted string literal, test with Test::LectroTest
Problem I guess for some motivation: I ripped this out of a larger library I’m half-working on to parse S-expressions […]
Optimizing Perl script which looks for world-writable files
Problem A script which scans a local filesystem and writes to a file a list of world-writable files found on […]
Expand hostnames from a string of hostnames and/or regex
Problem This code will be passed a string which will contain one or more hostnames. A hostname can be dotted-decimal […]
Perl DBI Sample with MySQL DDL
Problem I’ve been experimenting with Perl and MySql and wrote this code for connecting and writing to a database: # […]
How do you “sordid sort” alphanumeric strings?
Problem The question is about sorting alphanumeric string in a “more natural” order. Source: Marc LeBrun’s “Sordid Sort” Computist Quiz […]
Comparing two arrrays
Problem I have two arrays: first one is ip addresses from billing for blocking second is ip addresses from firewall […]
Parsing psql output into multiple files
Problem I wrote the following simple Perl script to read lines from stdin that are the output from a psql […]
Processing lexical analyses of sentences using the Perl split function
Problem I have two kinds of lexical analyses of sentences that I need to process. One type of data comes […]