No. $self you'll usually see in a lot of Object Oriented applications. When a
subroutine is called using the -> operator ($mw = MainWindow->new, for
example) the first arguement passed to that subroutine is the name of the
package/class. So, $self is usually used to display this. So, a common constructor is
sub new {
my ($self, %args) = @_;
return bless \%args, $self;
}
Look into perldoc perlboot, perldoc perltoot, perldoc -f bless, etc. Like the
name "new" for a constructor, you can name it anything you want, but many
choose to name it $self, because in a constructor it is literally the name of
your own package, and otherwhere it is a hash blessed to your own package. Hope
that helps.
In a message dated 2/19/2004 11:24:11 PM Eastern Standard Time,
[EMAIL PROTECTED] writes:
is $self a special scalar?
-Will
-----------------------------------
Handy Yet Cryptic Code.
Just to Look Cool to Look at and try to decipher without running it.
Windows
perl -e "printf qq.%3i\x20\x3d\x20\x27%c\x27\x09.,$_,$_ for 0x20..0x7e"
Unix
perl -e 'printf qq.%3i\x20\x3d\x20\x27%c\x27%7c.,$_,$_,0x20 for 0x20..0x7e'