$^M - Perldoc Browser

You are viewing the version of this documentation from Perl blead. This is the main development branch of Perl. (git commit f04eb08dc8f437d0e4883eaebf61eab1c77d4e8a)
#$^M

By default, running out of memory is an untrappable, fatal error. However, if suitably built, Perl can use the contents of $^M as an emergency memory pool after die()ing. Suppose that your Perl were compiled with -DPERL_EMERGENCY_SBRK and used Perl's malloc. Then

$^M = 'a' x (1 << 16);

would allocate a 64K buffer for use in an emergency. See the INSTALL file in the Perl distribution for information on how to add custom C compilation flags when compiling perl. To discourage casual use of this advanced feature, there is no English long name for this variable.

This variable was added in Perl 5.004.

AltStyle によって変換されたページ (->オリジナル) /