Subra said:
Can some one pls tell me wts the meaning of "$topIter->next()" ?
This calls the method next() on the object $topIter. Read the perlobj
documentation for more about this.
I know "->" is used for hash refs, but dont know when to use ->( ) !!!
Beside being used for method calls, '->' is also with references in
general for dereferencing. That is
$aref->[0] - Using an array reference as an array
$href->{foo} - Using an hash reference as an hash
$sref->(1,2,3) - Using a subroutine reference (ie. call the sub)
Read more about this in the perlref documentation under 'Using
references', rule number 3.
//Makholm