# https://www.twilio.com/docs/api/rest/subaccounts
 
- # Example No. 1 under POST parameters
  ################################################################################
  # Get Twilio from CPAN or ppm
  use Twilio;
 
  # Your Account Sid and Auth Token from twilio.com/user/account
  my $sid = 'AC6e1650084fe73e11a80270e3c5878a0c';
  my $token = '{{ auth_token }}';
  my $client = Twilio->new (sid => $sid, token => $token);
 
  my $account = $client->Accounts->create('Submarine');
  say $account->sid;
 
- # Example No. 1 under Finding Subaccounts
  ################################################################################
  # Get Twilio from CPAN or ppm
  use Twilio;
 
  # Your Account Sid and Auth Token from twilio.com/user/account
  my $sid = 'AC6e1650084fe73e11a80270e3c5878a0c';
  my $token = '{{ auth_token }}';
  my $client = Twilio->new (sid => $sid, token => $token);
 
  my $account = $client->Accounts->create('Submarine');
  say $account->sid;
 
- # Get an object from its sid. If you do not have a sid,
  # check out the list resource examples on this page
  my $account = $client->Accounts('AC6e1650084fe73e11a80270e3c5878a0c');
  $account->status = 'closed';
  say $account->status;
 
- # Example No. 2 under Finding Subaccounts
  ################################################################################
  # Get Twilio from CPAN or ppm
  use Twilio;
 
  # Your Account Sid and Auth Token from twilio.com/user/account
  my $sid = 'AC6e1650084fe73e11a80270e3c5878a0c';
  my $token = '{{ auth_token }}';
  my $client = Twilio->new (sid => $sid, token => $token);
 
  # Loop over the list of accounts and echo a property for each one
- for my $account ($client->Accounts(friendly_name => 'MySubaccount')) {
      say $account->status;
  }
 
- # Example No. 1 under Exchanging Phone Numbers Between Accounts
  ################################################################################
  # Get Twilio from CPAN or ppm
  use Twilio;
 
  # Your Account Sid and Auth Token from twilio.com/user/account
  my $sid = 'AC6e1650084fe73e11a80270e3c5878a0c';
  my $token = '{{ auth_token }}';
  my $client = Twilio->new (sid => $sid, token => $token);
 
  my $number = $client->IncomingPhoneNumbers('PN2a0747eba6abf96b7e3c3ff0b4530f6e');
  $number->account_sid = 'AC6e1650084fe73e11a80270e3c5878a0c';
  say $number->phone_number; # or just say $number;