#!/usr/bin/perl -w use strict; use File::Spec; if( @ARGV == 0 ) { print <catdir( 'samples', $ARGV[0] ) ); my( $path ) = File::Spec->catfile( $dir, $fname ); if( -f $path ) { use blib; use Cwd; my( $cwd ) = getcwd(); chdir $dir; my( $ret ) = do $fname; die "$@: $!" if $@; die "$!" if $!; # probably not necessary chdir $cwd; } else { die "file '$path' does not exist"; } # Local variables: # # mode: cperl # # End: #