Keep It Simple, Stupid | |
PerlMonks |
Re: Need to print bucket and filename which is uploaded on S3 storageby Athanasius (Archbishop) |
on Aug 21, 2019 at 07:41 UTC ( [id://11104773]=note: print w/replies, xml ) | Need Help?? |
Hello coolsaurabh, I’m assuming that “line 16” is this one:
Now, the documentation for the Amazon::S3::buckets method says it “Returns undef on error, else HASHREF of results.” So you need to test for an undef return value before attempting to dereference the hash reference. For example:
This way, if the call to buckets() returns undef, no dereference is attempted and @buckets remains unchanged as an empty list. Hope that helps,
In Section
Seekers of Perl Wisdom
|
|