my $file = "$op.pm"; $file =~ s/::/\//g; # / on *nix, \ on windows, etc. the point is: your local path separator require $file;