About 15,500,000 results
Open links in new tab
  1. What is the meaning of @_ in Perl? - Stack Overflow

    Dec 30, 2010 · 128 perldoc perlvar is the first place to check for any special-named Perl variable info. Quoting: @_: Within a subroutine the array @_ contains the parameters passed to that …

  2. How does double arrow (=>) operator work in Perl? - Stack Overflow

    Feb 2, 2016 · The => operator in perl is basically the same as comma. The only difference is that if there's an unquoted word on the left, it's treated like a quoted word. So you could have …

  3. 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"

  4. 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...

  5. regex - What is /^ and /i in Perl? - Stack Overflow

    The match operator is the syntax that tells the Perl interpreter: here comes a regex. In Perl, the match operator is normally delimited by '/' at start and end, but you can use delimiters (e.g., …

  6. 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 …

  7. What does exactly perl -pi -e do? - Stack Overflow

    Jan 25, 2015 · Thus perl is looping over the lines in the given files, executes the code with $_ set to the line and prints the resulting $_. The magic variabe $^I is set to an empty string.

  8. What is the difference between Perl's ( or, and ) and ( ||, && ) short ...

    Sep 25, 2012 · I came to Perl 5 from C and Perl 4 and always used || until I saw more scripts using or and I liked the way it looked. But as the above quiz shows, it's not without its pitfalls …

  9. 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 …

  10. arrays - Perl: if ( element in list ) - Stack Overflow

    Mar 5, 2010 · I'm looking for presence of an element in a list. In Python there is an in keyword and I would do something like: if element in list: doTask Is there something equivalent in Perl …