#!/usr/bin/perl -w ARG: foreach (@ARGV) { next if /^-/; s|::|/|g; $_ .= '.pm' unless /\.pm$/; foreach my $d (@INC) { $_ = "$d/$_", next ARG if -f "$d/$_" and -r _; } die "Can't find a module named $_\n"; } exec $ENV{EDITOR} || '/bin/vi', @ARGV;