#!/usr/bin/perl use strict; use warnings; my $class1 = $ARGV[rand @ARGV]; my $class2 = $ARGV[rand @ARGV]; $class1 =~ s{::}{/}g; require "$class1.pm"; $class2->method(); __END__