Recent Changes - Search:

Softwares

.

Perl-Default-Variable

"magic" scalars

There are a number of "magic" scalars with names that look like punctuation or line noise. These special variables are used for all kinds of purposes, and are documented in perlvar. The only one you need to know about for now is $_ which is the "default variable". It's used as the default argument to a number of functions in Perl, and it's set implicitly by certain looping constructs.

    print; # prints contents of $_ by default

Edit - History - Print - Recent Changes - Search
Page last modified on July 16, 2012, at 04:00 PM