Not tested, but should do the trick baring any typos (if you need more properties than name b/c you're looking for other data, either remove the properties => argument or add the values you want) -
#!/usr/bin/perl
use strict;
use warnings;
use VMware::VIRuntime;
Opts::parse();
Opts::validate();
Util::connect();
my $templates = Vim::find_entity_views( view_type => 'VirtualMachine', filter => { 'config.template' => 'true' }, properties => [ 'name' ] );
foreach my $template (@{$templates || [ ]}) {
print "Tempate: " . $template->{'name'} . "\n";
}
Util::disconnect();
Reuben Stump | http://www.virtuin.com | @ReubenStump