- or download this
use strict;
use warnings;
...
print "\nHow does it print?\n";
$E1->print_student();
- or download this
$ perl classes.pl
What does Data::Dump see for my Employee?
bless({ hourlywage => 50, hours => 40, name => "George" }, "Employee")
How does it print?
- or download this
$ perl classes.pl
What does Data::Dump see for my Employee?
...
How does it print?
Employee info: name: George hours: 40 wage: 50
- or download this
use strict;
use warnings;
...
print "\nDoes get_EmployeeList work?\n";
pp($L->get_EmployeeList());
- or download this
$ perl classes.pl
What does Data::Dump see for my Employee?
...
bless({ hourlywage => 35, hours => 30, name => "Ellen" }, "Employee"
+),
bless({ hourlywage => 5, hours => 10, name => "Phideaux" }, "Employe
+e"),
]
- or download this
package EmployeeList;
. . .
...
# print "current employee name is: ", $anEmployee->{name}, ".\n"
+;
}
}
- or download this
# Get a list of employees between ages 30 and 50 who make more than $2
+5/hr
my $interesting = $L->query( [ "AGE", "BETWEEN", 30, 50 ],
[ "HOURLY", "ABOVE", 25 ],
);
- or download this
my $interesting = $L->filter_age( 30, 50 )
->filter_hourly( 25, 99999999999999 );