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 to efficiently calculate a running standard deviation?

I have an array of lists of numbers, e.g.: [0] (0.01, 0.01, 0.02, 0.04, 0.03) [1] (0.00, 0.02, 0.02, 0.03, 0.02) [2] (0.01, 0.02, 0.02, 0.03, 0.02) ... [n] (0.01, 0.00, 0.01, 0.05, 0.03) What I would like to do is efficiently calculate …

python perl statistics
How can I see if a Perl hash already has a certain key?

I have a Perl script that is counting the number of occurrences of various strings in a text file. I …

perl hash key lookup
How to match a substring in a string, ignoring case

I'm looking for ignore case string comparison in Python. I tried with: if line.find('mandy') >= 0: but no success …

python perl
In Perl, how do I create a hash whose keys come from a given array?

Let's say I have an array, and I know I'm going to be doing a lot of "Does the array …

arrays perl hash
How can I output UTF-8 from Perl?

I am trying to write a Perl script using the "utf8" pragma, and I'm getting unexpected results. I'm using Mac …

perl unicode utf-8
How can I install a CPAN module into a local directory?

I'm using a hosted Linux machine so I don't have permissions to write into the /usr/lib directory. When I …

perl module installation cpan
How to decrypt hash stored by bcrypt

I have this script that encrypts a password but I don't know how to reverse it and decrypt it. This …

perl bcrypt
Rename Files and Directories (Add Prefix)

I would like to add prefix on all folders and directories. Example: I have Hi.jpg 1.txt folder/ this.file_…

linux perl shell
how to remove the first two columns in a file using shell (awk, sed, whatever)

I have a file with many lines in each line there are many columns(fields) separated by blank " " the numbers …

perl shell awk sed cut
What's the safest way to iterate through the keys of a Perl hash?

If I have a Perl hash with a bunch of (key, value) pairs, what is the preferred method of iterating …

perl hash iteration each