Perldoc Search: "$$" perl-5.20.1

search official POD


20 PODs, 81 LINEs found.
perlipc.pod
37 :             kill HUP => -$$;
38 :             # snazzy writing of: kill("HUP", -$$)
144 :           print "PID: $$\n";
516 :             print CHILD_WTR "Parent Pid $$ is sending this\n";
518 :             print "Parent Pid $$ just read this: '$line'\n";
526 :             print "Child Pid $$ just read this: '$line'\n";
527 :             print PARENT_WTR "Child Pid $$ is sending this\n";
553 :             print CHILD "Parent Pid $$ is sending this\n";
555 :             print "Parent Pid $$ just read this: '$line'\n";
562 :             print "Child Pid $$ just read this: '$line'\n";
563 :             print PARENT "Child Pid $$ is sending this\n";
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" }
perltie.pod
28 :         tie $my_speed,  'Nice', $$;
45 :                 my $pid = shift || $$; # 0 means me
63 :         This method will be triggered every time the tied variable is accessed (read). It takes no arguments beyond its self reference, which is the object representing the scalar we're dealing with. Because in this case we're using just a SCALAR ref for the tied scalar object, a simple $$self allows the method to get at the real value stored there. In our example below, that real value is the process ID to which we've tied our variable.
71 :                 $nicety = getpriority(PRIO_PROCESS, $$self);
101 :                 unless (defined setpriority(PRIO_PROCESS, $$self, $new_nicety)) {
115 :                 carp "[ Nice::DESTROY pid $$self ]" if $Nice::DEBUG;
611 :             sub PRINT { $r = shift; $$r++; print join($,,map(uc($_),@_)),$\ }
632 :                 # add to $$bufref, set $len to number of characters read
648 :                 return "READLINE called " . ++$$r . " times\n";
perlref.pod
164 :             $bar = $$scalarref;
166 :             $$arrayref[0] = "January";
167 :             $$hashref{"KEY"} = "VALUE";
174 :             print $$$$refrefref;
189 :         Because of being able to omit the curlies for the simple case of $$x, people often make the mistake of viewing the dereferencing symbols as proper operators, and wonder about their precedence. If they were, though, you could use parentheses instead of braces. That's not the case. Consider the difference below; case 0 is a short-hand version of case 1, *not* case 2:
191 :             $$hashref{"KEY"}   = "VALUE";       # CASE 0
284 :         $$name = 1;                 # Sets $foo
307 :             print $$ref;
perlsub.pod
288 :         sub foo :prototype($$) ($left, $right) {
904 :        sub mylink ($$)         mylink $old, $new
905 :        sub myvec ($$$)         myvec $var, $offset, 1
906 :        sub myindex ($$;$)      myindex &getstring, "substr"
907 :        sub mysyswrite ($$$;$)  mysyswrite $buf, 0, length($buf) - $off, $off
911 :        sub mysplice (+$$@)     mysplice @array, 0, 2, @pushme
1020 :             sub foo($$);
1021 :             sub foo($$) {
perlperf.pod
103 :         my $STR = "$$-this and that";
739 :         logger->debug( "A logging message via process-id: $$ INC: " . Dumper(\%INC) )
743 :         logger->debug( "A logging message via process-id: $$ INC: " . Dumper(\%INC) ) if $DEBUG;
768 :                     debug( "A $0 logging message via process-id: $$" . Dumper(\%INC) )
771 :                     debug( "A $0 logging message via process-id: $$" . Dumper(\%INC) ) if $DEBUG
810 :                     debug( "A $0 logging message via process-id: $$" . Dumper(\%INC) )
813 :                     debug( "A $0 logging message via process-id: $$" . Dumper(\%INC) ) if DEBUG
840 :             debug "A $0 logging message via process-id: $$" . Dumper(\%INC);
perlfunc.pod
889 :             eval "\$$x++";  # CASE 5
890 :             $$x++;          # CASE 6
1230 :         Note for Linux users: Between v5.8.1 and v5.16.0 Perl would work around non-POSIX thread semantics the minority of Linux systems (and Debian GNU/kFreeBSD systems) that used LinuxThreads, this emulation has since been removed. See the documentation for $$ for details.
1959 :             open(EXTRACT, "|sort >Tmp$$")            # $$ is our process id
2123 :             print HANDLE "stuff $$\n";
3364 :         If the subroutine's prototype is "($$)", the elements to be compared are passed by reference in @_, as for a normal subroutine. This is slower than unprototyped subroutines, where the elements to be compared are passed into the subroutine as the package global variables $a and $b (see example below). Note that in the latter case, it is usually highly counter-productive to declare $a and $b as lexicals.
3454 :             sub backwards ($$) { $_[1] cmp $_[0]; }  # $a and $b are
perlcheat.pod
16 :       \      reference       $$foo[1]       aka $foo->[1]
17 :       $@%&*  dereference     $$foo{bar}     aka $foo->{bar}
18 :       []     anon. arrayref  ${$$foo[1]}[2] aka $foo->[1]->[2]
19 :       {}     anon. hashref   ${$$foo[1]}[2] aka $foo->[1][2]
67 :        7 size   7 yearday     7 is_require  $$    process ID
perlinterp.pod
299 :         2                { $$ = newASSIGNOP(OPf_STACKED, $1, $2, $3); }
301 :         4                { $$ = newBINOP($2, 0, scalar($1), scalar($3)); }
312 :                 { $$ = newBINOP($2, 0, scalar($1), scalar($3)); }
314 :     What this does is creates a new binary op, and feeds it a number of variables. The variables refer to the tokens: $1 is the first token in the input, $2 the second, and so on - think regular expression backreferences. $$ is the op returned from this reduction. So, we call "newBINOP" to create a new binary operator. The first parameter to "newBINOP", a function in op.c, is the op type. It's an addition operator, so we want the type to be "ADDOP". We could specify this directly, but it's right there as the second token in the input, so we use $2. The second parameter is the op's flags: 0 means "nothing special". Then the things to add: the left and right hand side of our expression, in scalar context.
perlvar.pod
87 :     $$      The process number of the Perl running this script. Though you *can* set this variable, doing so is generally discouraged, although it can be invaluable for some testing purposes. It will be reset automatically across "fork()" calls.
91 :             LinuxThreads is now obsolete on Linux, and caching "getpid()" like this made embedding perl unnecessarily complex (since you'd have to manually update the value of $$), so now $$ and "getppid()" will always return the same values as the underlying C library.
1006 :                         print "$$self: ${^GLOBAL_PHASE}\n";
perldiag.pod
160 :             $$r = 503
477 :         (F) You said something like "local $$ref", which Perl can't currently handle, because when it goes to restore the old value of whatever $ref pointed to after the scope of the local() is finished, it can't be sure that $ref will still be a reference.
perlop.pod
1340 :             $perl_info  = qx(ps $$);            # that's Perl's $$
1341 :             $shell_info = qx'ps $$';            # that's the new shell's $$
perlpragma.pod
50 :                 int($$l) + int($$r);
52 :                 $$l + $$r;
perldsc.pod
148 :         $$aref[2][2]        # confusing
152 :     The seemingly equivalent construct in Perl, $$aref[$i] first does the deref of $aref, making it take $aref as a reference to an array, and then dereference that, and finally tell you the *i'th* value of the array pointed to by $AoA. If you wanted the C notion, you'd have to write "${$AoA[$i]}" to force the $AoA[$i] to get evaluated first before the leading "$" dereferencer.
perlreftut.pod
258 :     *   In Use Rule 1, you can omit the curly brackets whenever the thing inside them is an atomic scalar variable like $aref. For example, @$aref is the same as "@{$aref}", and $$aref[1] is the same as "${$aref}[1]". If you're just starting out, you may want to adopt the habit of always including the curly brackets.
perlfilter.pod
338 :         sub MySub($$@) {
perlcall.pod
768 :                 print "$index: $$self[$index]\n";
perldebug.pod
364 :                 This module should implement a method named "new" that returns an object with two methods: "IN" and "OUT". These should return filehandles to use for debugging input and output correspondingly. The "new" method should inspect an argument containing the value of $ENV{PERLDB_NOTTY} at startup, or "$ENV{HOME}/.perldbtty$$" otherwise. This file is not inspected for proper ownership, so security hazards are theoretically possible.
perlreapi.pod
481 :     If "->offs[num].start" or "->offs[num].end" is -1 then that capture group did not match. "->offs[0].start/end" represents $& (or "${^MATCH}" under "//p") and "->offs[paren].end" matches $$paren where $paren = 1>.
perldata.pod
37 :     Names that start with a digit may contain only more digits. Names that do not start with a letter, underscore, digit or a caret (i.e. a control character) are limited to one character, e.g., $% or $$. (Most of these one character names have a predefined significance to Perl. For instance, $$ is the current process id.)
perlfork.pod
24 :     $$ or $PROCESS_ID
<< Back to Perldoc Search