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

Perl: Destroying an Object

Perl: Destroying an Object
{filelink=14325}

#!/usr/local/bin/perl -w
package Person;
use strict;
sub new {
    my $self = { };
    bless($self);
    $self->{Name} = "";
    $self->{AGE}   = 0;
    return $self;
# Create a method named DESTROY. This will be invoked when there are no more references to the object,
sub DESTROY {
    my $self = shift;
    printf("$self dying at %s
", scalar localtime);
}
}

Users who found this page were searching for:

  • perl program to find factorial for n numbers
  • how to underline text in java swing
  • python compare strings
  • windows7 counting lines in file
  • calculate factorial perl
  • how to subtract seconds from time in java
  • Write a PERL script to find factorial for n numbers.
  • replace element java array
  • java array resize
  • Perl file query "-f"

No comments yet.

Leave a Comment