Perldoc Search: "$\" perl-5.20.1

search official POD

12 PODs, 27 LINEs found.
664 :             $\ = "\r\n";
670 :             $\ = "\f";
682 :     Why? Because "nasty_break()" modifies $\ without localizing it first. The value you set in "nasty_break()" is still there when you return. The fix is to add "local()" so the value doesn't leak out of "nasty_break()":
684 :         local $\ = "\f";
752 :     $\      The output record separator for the print operator. If defined, this value is printed after the last of print's arguments. Default is "undef".
756 :             Mnemonic: you set $\ instead of adding "\n" at the end of the print. Also, it's just like $/, but it's what you get "back" from Perl.
282 :         binmode() is important not only for readline() and print() operations, but also when using read(), seek(), sysread(), syswrite() and tell() (see perlport for more details). See the $/ and $\ variables in perlvar for how to manually set your input and output line-termination sequences.
2123 :             print HANDLE "stuff $$\n";
2637 :         The current value of $, (if any) is printed between each LIST item. The current value of $\ (if any) is printed after the entire LIST has been printed. Because print takes a LIST, anything in the LIST is evaluated in list context, including any subroutines whose return lists you pass to "print". Be careful not to follow the print keyword with a left parenthesis unless you want the corresponding right parenthesis to terminate the arguments to the print; put parentheses around all arguments (or interpose a "+", but that doesn't look as good).
2650 :         Equivalent to "print FILEHANDLE sprintf(FORMAT, LIST)", except that $\ (the output record separator) is not appended. The FORMAT and the LIST are actually parsed as a single list. The first argument of the list will be interpreted as the "printf" format. This means that "printf(@_)" will use $_[0] as the format. See sprintf for an explanation of the format argument. If "use locale" (including "use locale ':not_characters'") is in effect and POSIX::setlocale() has been called, the character used for the decimal separator in formatted floating-point numbers is affected by the LC_NUMERIC locale setting. See perllocale and POSIX.
3093 :     say Just like "print", but implicitly appends a newline. "say LIST" is simply an abbreviation for "{ local $\ = "\n"; print LIST }". To use FILEHANDLE without a LIST to print the contents of $_ to it, you must use a real filehandle like "FH", not an indirect one like $fh.
355 :          enables automatic line-ending processing. It has two separate effects. First, it automatically chomps $/ (the input record separator) when used with -n or -p. Second, it assigns $\ (the output record separator) to have the value of *octnum* so that any print statements will have that separator added back on. If *octnum* is omitted, sets $\ to the current value of $/. For instance, to trim lines to 80 columns:
359 :          Note that the assignment "$\ = $/" is done when the switch is processed, so the input record separator can be different than the output record separator if the -l switch is followed by a -0 switch:
363 :          This sets $\ to newline and then sets $/ to the null character.
2285 :     Possible unintended interpolation of $\ in regex
2286 :         (W ambiguous) You said something like "m/$\/" in a regex. The regex "m/foo$\s+bar/m" translates to: match the word 'foo', the output record separator (see "$\" in perlvar) and the letter 's' (one time or more) followed by the word 'bar'.
3355 :         (D deprecated) Using literal control characters in the source to refer to the ^FOO variables, like $^X and "${^GLOBAL_PHASE}" is now deprecated. This only affects code like "$\cT", where \cT is a control in the source code: "${"\cT"}" and $^T remain valid.
611 :             sub PRINT { $r = shift; $$r++; print join($,,map(uc($_),@_)),$\ }
613 :         "say()" acts just like "print()" except $\ will be localized to "\n" so you need do nothing special to handle "say()" in "PRINT()".
38 :     *   The print() statement does not add field and record separators unless you set $, and $\. You can set $OFS and $ORS if you're using the English module.
64 :               ORS       $\
696 :         Directory and File =~ m|[^\0- "\.\$\%\&:\@\\^\|\177]+|
144 :           print "PID: $$\n";
63 :        3 nlink  3 day         3 subroutine  $\    output separator
189 :     We saw in the section above that there were ordinary characters, which represented themselves, and special characters, which needed a backslash "\" to represent themselves. The same is true in a character class, but the sets of ordinary and special characters inside a character class are different than those outside a character class. The special characters for a character class are "-]\^$" (and the pattern delimiter, whatever it is). "]" is special because it denotes the end of a character class. "$" is special because it denotes a scalar variable. "\" is special because it is used in escape sequences, just like above. Here is how the special characters "]$\" are handled:
1258 :                 s/(\$\w+)/$1/eeg;
83 :           (?<sigil> [&*\$\@\%])
<< Back to Perldoc Search