#!/usr/bin/perl -w

use File::Spec::Functions;
    # Ohne Modulnamen aufgerufen?
die "usage: $0 Module" unless defined $ARGV[0];

$subpath  = catfile(split "::", $ARGV[0]) . ".pm";

foreach $path (@INC) {
        # Pfad + Modulverzeichnis + Modul + pm
    $fullpath = catfile($path, $subpath);

    if(-e $fullpath) {
        print "$fullpath\n";   # Gefunden!
        last;
    }
}
