Perldoc Search: "$:" perl-5.20.1

search official POD


7 PODs, 10 LINEs found.
perlipc.pod
616 :         sub logmsg { print "$0 $$: @_ at ", scalar localtime(), "\n" }
657 :         sub logmsg { print "$0 $$: @_ at ", scalar localtime(), "\n" }
810 :         sub logmsg { print "$0 $$: @_ at ", scalar localtime(), "\n" }
perlfunc.pod
2592 :         A package statement affects dynamic variables only, including those you've used "local" on, but *not* lexically-scoped variables, which are created with "my", "state", or "our". Typically it would be the first declaration in a file included by "require" or "use". You can switch into a package in more than one place, since this only determines which default symbol table the compiler uses for the rest of that block. You can refer to identifiers in other packages than the current one by prefixing the identifier with the package name and a double colon, as in $SomePack::var or "ThatPack::INPUT_HANDLE". If package name is omitted, the "main" package as assumed. That is, $::sail is equivalent to $main::sail (as well as to $main'sail, still seen in ancient code, mostly from Perl 4).
3485 :         then $a and $b are $main::a and $main::b (or $::a and $::b), but if you're in the "FooPack" package, it's the same as typing
perlsub.pod
403 :         print "$x and $::x\n";
perldata.pod
57 :     While you can mix double colons with singles quotes, the quotes must come after the colons: $::::'foo and $foo::'bar are legal, but $::'::foo and $foo'::bar are not.
perlform.pod
86 :     On text fields the caret enables a kind of fill mode. Instead of an arbitrary expression, the value supplied must be a scalar variable that contains a text string. Perl puts the next portion of the text into the field, and then chops off the front of the string so that the next time the variable is referenced, more of the text can be printed. (Yes, this means that the variable itself is altered during execution of the write() call, and is not restored.) The next portion of text is determined by a crude line-breaking algorithm. You may use the carriage return character ("\r") to force a line break. You can change which characters are legal to break on by changing the variable $: (that's $FORMAT_LINE_BREAK_CHARACTERS if you're using the English module) to a list of the desired characters.
perlvar.pod
795 :     $:      The current set of characters after which a string may be broken to fill continuation fields (starting with "^") in a format. The default is " \n-", to break on a space, newline, or a hyphen.
perlmod.pod
6 :     Perl provides a mechanism for alternative namespaces to protect packages from stomping on each other's variables. In fact, there's really no such thing as a global variable in Perl. The package statement declares the compilation unit as being in the given namespace. The scope of the package declaration is from the declaration itself through the end of the enclosing block, "eval", or file, whichever comes first (the same scope as the my() and local() operators). Unqualified dynamic identifiers will be in this namespace, except for those few identifiers that if unqualified, default to the main package instead of the current one as described below. A package statement affects only dynamic variables--including those you've used local() on--but *not* lexical variables created with my(). Typically it would be the first declaration in a file included by the "do", "require", or "use" operators. You can switch into a package in more than one place; it merely influences which symbol table is used by the compiler for the rest of that block. You can refer to variables and filehandles in other packages by prefixing the identifier with the package name and a double colon: $Package::Variable. If the package name is null, the "main" package is assumed. That is, $::sail is equivalent to $main::sail.
<< Back to Perldoc Search