[Bandung-pm] Chapter 11, Intermediate Perl

zach doctor_moron at yahoo.com
Wed Sep 6 20:14:25 PDT 2006


Ada kode gini di Intermediate Perl di Chapter 11 :

{ package Cow;
  sub sound { 'moooo' }
  sub speak {
    my $class = shift;
    print "a $class goes ", $class->sound, "!\n";
  }
}

Kenapa mesti berada di naked block ya?  kenapa tidak :

package Cow;
sub sound { 'moooo' }
sub speak {
  my $class = shift;
  print "a $class goes ", $class->sound, "!\n";
}

Apa yang berusaha ditunjukan sama si penulis ?



zak




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Bandung-pm mailing list