Sample code for 30+ languages & platforms
Perl

Example: Http.GetCacheRoot method

Demonstrates the GetCacheRoot method.

Chilkat Perl Downloads

Chilkat2 Perl
use strict;
use warnings;
use Chilkat2;

my $http = Chilkat2::Http->new;

# Establish 2 cache root directories.
$http->AddCacheRoot('c:/example/httpCacheA/');
$http->AddCacheRoot('c:/example/httpCacheB/');

print 'Number of cache roots: ', $http->NumCacheRoots, "\n";

print '1st cache root: ', $http->GetCacheRoot(0), "\n";
print '2nd cache root: ', $http->GetCacheRoot(1), "\n";

# Output:

# Number of cache roots: 2
# 1st cache root: c:/example/httpCacheA/
# 2nd cache root: c:/example/httpCacheB/