in reply to Archive::Tar basic question

$tar is an object. Generally, perl objects happen like this:
sub new { my $self = {}; [...] bless($self); }
$self is declared as a hash reference, and returned as a "bless'd" reference -- that is, an object. Qv.

http://www.perl.com/doc/manual/html/pod/perlobj.html

So you have to use "object", aka. "indirect", notation with it:
$tar->{key};
This is distinct from, but similar to, the syntax for calling a method, which is a function in the module.
$tar->method();

Replies are listed 'Best First'.
Re^2: Archive::Tar basic question
by drblove27 (Sexton) on Aug 04, 2009 at 02:24 UTC
    How would I list out the keys to use here? Thank you for taking the time to explain.
        Thanks.