Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Perl: How to Initialize Attributes In The Constructor

Perl: How to Initialize Attributes In The Constructor
{filelink=14324}

#!/usr/local/bin/perl -w
package Person;
sub new {
    my $self = { };
    bless($self);
    # Initialize two attributes
    $self->{Name} = "";
    $self->{AGE}   = 0;
    return $self;
}

Users who found this page were searching for:

  • how to put python buttons in a frame
  • python local_hostname
  • python menu
  • python read Excel xml
  • python list processing

No comments yet.

Leave a Comment