#! perl -slw use strict; die "You must supply an extension" unless @ARGV; for ( @ARGV ) { my( $extention, $type ) = split '=', `assoc $_ 2>nul`; warn "No association was found for extension '$_'" and next unless defined $type; chomp $type; my( undef, $cmd ) = split '=', `ftype $type 2>nul`; warn "No command was associated with type '$type'" and next unless defined $cmd; chomp $cmd; print "Extension '$_' is associated with type '$type' " . "\n\tand the command: '$cmd'"; }