my $object = new Employee(1, "Geeks" , "forGeeks" ); # object here is a hash to a reference print ( "$object->{_firstName} \n" ); print ( "$object->{_serialNum} \n" ); 输出如下: Geeks 1 Perl中的对象的工作方式与其他语言(例如C ++, Java等)相同。上面的程序显示了Perl中对象的工作, 其创建以及在类中的使用。
<c:forEach items="${requestScope.people}" var="person"> <c:out value="${}"/> <c:out value="${}"/> <c:out value="${person.place}"/> </c:forEach> Details for person with id=2 <c:out value="Name ${} from ${person.place}" /> 1. 2. 3. 4. 5. 6. 7. 8...