There is an easy way to understand -> (at least I hope so):
$something->func($x);
is nearly the same as
func($something,$x);
with func a subroutine out of the package (called class) that $something belongs to
There is also an easy way to understand printf:
printf("bla %xyz chink %ru wong",$a,$b);
is somewhat equivalent to
print "bla $a chink $b wong";
The printf often does some conversions of the variables, but basically thats it.
Now in the code someone on IRC gave you the printf is not the normal builtin perl printf, since it was called with the -> syntax. Instead it must be subroutine out of the package $t belongs to. What package does $t belong to? Date::Manip::Delta, since $t was created with my $t = Date::Manip::Delta->new;
UPDATE: Added the word 'nearly'
In reply to Re: Getting times (weeks, days, hours, minutes, seconds)
by jethro
in thread Getting times (weeks, days, hours, minutes, seconds)
by Lady_Aleena
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |