=item cos EXPR
+=item cos
+
Returns the cosine of EXPR (expressed in radians). If EXPR is omitted,
takes cosine of C<$_>.
See also L</exp> for the inverse operation.
-=item lstat FILEHANDLE
-
=item lstat EXPR
=item lstat
4-byte integer 0x12345678 (305419896 decimal) be ordered natively
(arranged in and handled by the CPU registers) into bytes as
- 0x12 0x34 0x56 0x78 # little-endian
- 0x78 0x56 0x34 0x12 # big-endian
+ 0x12 0x34 0x56 0x78 # big-endian
+ 0x78 0x56 0x34 0x12 # little-endian
-Basically, the Intel, Alpha, and VAX CPUs are little-endian, while
-everybody else, for example Motorola m68k/88k, PPC, Sparc, HP PA,
-Power, and Cray are big-endian. MIPS can be either: Digital used it
-in little-endian mode; SGI uses it in big-endian mode.
+Basically, the Intel and VAX CPUs are little-endian, while everybody
+else, for example Motorola m68k/88k, PPC, Sparc, HP PA, Power, and
+Cray are big-endian. Alpha and MIPS can be either: Digital/Compaq
+used/uses them in little-endian mode; SGI/Cray uses them in big-endian mode.
The names `big-endian' and `little-endian' are comic references to
the classic "Gulliver's Travels" (via the paper "On Holy Wars and a
The same template may generally also be used in unpack().
-=item package
-
=item package NAMESPACE
+=item package
+
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, file, or eval (the same as the C<my> operator).
=item pos
Returns the offset of where the last C<m//g> search left off for the variable
-is in question (C<$_> is used when the variable is not specified). May be
+in question (C<$_> is used when the variable is not specified). May be
modified to change that offset. Such modification will also influence
the C<\G> zero-width assertion in regular expressions. See L<perlre> and
L<perlop>.
result, any non-standard extensions in your local C<sprintf> are not
available from Perl.
+Unlike C<printf>, C<sprintf> does not do what you probably mean when you
+pass it an array as your first argument. The array is given scalar context,
+and instead of using the 0th element of the array as the format, Perl will
+use the count of elements in the array as the format, which is almost never
+useful.
+
Perl's C<sprintf> permits the following universally-known conversions:
%% a percent sign
%O a synonym for %lo
%F a synonym for %f
+Note that the number of exponent digits in the scientific notation by
+C<%e>, C<%E>, C<%g> and C<%G> for numbers with the modulus of the
+exponent less than 100 is system-dependent: it may be three or less
+(zero-padded as necessary). In other words, 1.23 times ten to the
+99th may be either "1.23e99" or "1.23e099".
+
Perl permits the following universally-known flags between the C<%>
and the conversion letter:
is defined in the C<Exporter> module. See L<Exporter>. If no C<import>
method can be found then the call is skipped.
-If you don't want your namespace altered, explicitly supply an empty list:
+If you do not want to call the package's C<import> method (for instance,
+to stop your namespace from being altered), explicitly supply the empty list:
use Module ();
If no C<unimport> method can be found the call fails with a fatal error.
-See L<perlmod> for a list of standard modules and pragmas.
+See L<perlmod> for a list of standard modules and pragmas. See L<perlrun>
+for the C<-M> and C<-m> command-line options to perl that give C<use>
+functionality from the command-line.
=item utime LIST