|
Posted by bmaynard on October 23, 2006, 3:20 pm
Please log in for more thread options
Okay you are right perhaps an example would help. I am doing this:
my @files = @{ $sftp->ls( $conf ) };
foreach my $ref ( @files )
{
next if $ref-> eq "." || $ref-> eq "..";
print $ref-> . "\n"
}
However, no matter what I do dealing with $ref always seems to be
empty. When I refer to 'handle' I mean how I am supposed to handle the
object I am not referring to file handles or any other type of handle,
just the fact that I have data coming in, but I am not sure how I can
get my script to handle the data since there I don't seem to be able to
access the contents of the Net::SFTP::Attributes object.
Paul Lalli wrote:
> bmaynard@geekserv.com wrote:
> > Paul Lalli wrote:
> > > bmaynard@geekserv.com wrote:
> > > > Does anyone know how to handle a Net::SFTP::Attributes object? An
> > > > example would be awesome if anyone can provide?
> > >
> > > What was wrong with the descriptions and example you found when you
> > > looked up the documentation to the module?
> > >
> > > http://search.cpan.org/~dbrobins/Net-SFTP-0.10/lib/Net/SFTP/Attributes.pm
> > The information in the documentation is very terse, and really doesn't
> > give a good description on how to handle the data or at least a
> > description on what format it is stored in.
>
> I don't at all understand what you're getting at. The documentation is
> "terse" because there's very little to say about it. There's nothing
> complicated. The size() method returns the size (a number of bytes).
> The atime() method returns the last access time of the file (a number,
> I'm sure. Presumably seconds since the epoch, like stat() itself
> returns. A simple printing of that value would confirm it.
>
> Can you be any more specific about what parts you don't understand?
> You've twice now used the term "handle", which has no meaning in this
> realm. What do you want to do with the data, and how are you being
> prevented from doing it?
>
> Paul Lalli
|