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.

Find size of an array in Perl

I seem to have come across several different ways to find the size of an array. What is the difference …

perl
How do I break out of a loop in Perl?

I'm trying to use a break statement in a for loop, but since I'm also using strict subs in my …

perl loops break strict
How to fix a locale setting warning from Perl?

When I run perl, I get the warning: perl: warning: Setting locale failed. perl: warning: Please check that your locale …

perl locale
How can I check if a Perl array contains a particular value?

I am trying to figure out a way of checking for the existence of a value in an array without …

perl arrays comparison
How do I compare two strings in Perl?

How do I compare two strings in Perl? I am learning Perl, I had this basic question looked it up …

perl string-comparison
How can I pass command-line arguments to a Perl program?

I'm working on a Perl script. How can I pass command line parameters to it? Example: script.pl "string1" "string2"

perl command-line
How do you round a floating point number in Perl?

How can I round a decimal number (floating point) to the nearest integer? e.g. 1.2 = 1 1.7 = 2

perl floating-point rounding
How can I print the contents of a hash in Perl?

I keep printing my hash as # of buckets / # allocated. How do I print the contents of my hash? Without using …

perl hash printing
Check whether a string contains a substring

How can I check whether a given string contains a certain substring, using Perl? More specifically, I want to see …

string perl string-matching
String compare in Perl with "eq" vs "=="

I am (a complete Perl newbie) doing string compare in an if statement: If I do following: if ($str1 == "taste" &…

string perl