About 17,600,000 results
Open links in new tab
  1. operators - What is the difference between "||" and "or" in Perl ...

    Nov 10, 2019 · 53 From Perl documentation: OR List operators On the right side of a list operator, it has very low precedence, such that it controls all comma-separated expressions found there.

  2. How can I parse command-line arguments in a Perl program?

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

  3. How do you round a floating point number in Perl?

    Output of perldoc -q round Does Perl have a round () function? What about ceil () and floor ()? Trig functions? Remember that int() merely truncates toward 0. For rounding to a certain …

  4. How do I perform a Perl substitution on a string while keeping the ...

    In Perl, what is a good way to perform a replacement on a string using a regular expression and store the value in a different variable, without changing the original? I usually just copy the …

  5. Should I use \\d or [0-9] to match digits in a Perl regex?

    Per perldoc perluniintro, Perl does not support using digits other than [0-9] as numbers, so I would definitely use [0-9] if the following are both true: You want to use the result as a number (such …

  6. 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 through all the keys? I have heard that using each may in some way have unintended side …

  7. Perl: Use s/ (replace) and return new string - Stack Overflow

    In Perl, the operator s/ is used to replace parts of a string. Now s/ will alter its parameter (the string) in place. I would however like to replace parts of a string befor printing it, as in pri...

  8. What is the significance of -T or -w in #!/usr/bin/perl?

    Jun 29, 2012 · In the case of perl /usr/bin/perl is the path to the perl interpreter. If the hashbang is left out the *nix systems won't know how to parse the script when invoked as an executable.

  9. String compare in Perl with "eq" vs "==" - Stack Overflow

    Dec 27, 2012 · String compare in Perl with "eq" vs "==" [duplicate] Asked 12 years, 11 months ago Modified 9 months ago Viewed 346k times

  10. How is Perl's @INC constructed? - Stack Overflow

    Nov 28, 2023 · What are all the ways of affecting where Perl modules are searched for? or, How is Perl's @INC constructed? As we know, Perl uses @INC array containing directory names to …