operators - What does =~ do in Perl? - Stack Overflow man perlop "perlop - Perl operators and precedence" (at least in UNIX-like) answers this question: "Binary "=~" binds a scalar expression to a pattern match " – U Windl Commented Apr 1, 2020 at 21:11
variables - What is the meaning of @_ in Perl? - Stack Overflow 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 subroutine More details can be found in perldoc perlsub (Perl subroutines) linked from the perlvar: Any arguments passed in show up in the array @_
What does the - gt; arrow do in Perl? - Stack Overflow Perl arrow operator has one other use: Class−>method invokes subroutine method in package Class though it's completely different than your code sample Only including it for completeness for the question in the title
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
Perl flags -pe, -pi, -p, -w, -d, -i, -t? - Stack Overflow However, when I try to google for what each flag means, I mainly get results to generic Perl sites and no specific information regarding the flags or their use is found there Below are the flags that I encounter most often, and I don't have a clue what they mean: perl -pe; perl -pi; perl -p; perl -w; perl -d; perl -i; perl -t
operators - What does =~ mean in Perl? - Stack Overflow =~ is the Perl binding operator It's generally used to apply a regular expression to a string; for instance, to test if a string matches a pattern: It's generally used to apply a regular expression to a string; for instance, to test if a string matches a pattern:
What is the difference of using special variable $_ and @_ in Perl? The reason $_ is used so often is that some Perl operators assign to it by default, and others use its value as a default for their argument It can lead to shorter code if you embrace it, but you never have to use it