From 7c6f9f2940e42f2a2d14746d405f0686dd9613ef Mon Sep 17 00:00:00 2001 From: othocaeS Date: Wed, 15 Jun 2016 15:29:00 -0400 Subject: [PATCH] trying to make perl scripts to plot data --- scripts/extract_power_curve.pl | 4 ++++ scripts/uninstall.pl | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100755 scripts/extract_power_curve.pl create mode 100755 scripts/uninstall.pl diff --git a/scripts/extract_power_curve.pl b/scripts/extract_power_curve.pl new file mode 100755 index 0000000..ace7328 --- /dev/null +++ b/scripts/extract_power_curve.pl @@ -0,0 +1,4 @@ +#!/usr/local/bin/perl + +use PDL::Graphics::Gnuplot; +gplot( xvals(5)**2 ); \ No newline at end of file diff --git a/scripts/uninstall.pl b/scripts/uninstall.pl new file mode 100755 index 0000000..75a18af --- /dev/null +++ b/scripts/uninstall.pl @@ -0,0 +1,26 @@ +#!/usr/local/bin/perl + +# uninstall_perl_module.pl from PerlTricks.com + +use 5.14.2; +use ExtUtils::Installed; +use ExtUtils::Packlist; + +# Exit unless a module name was passed +die ("Error: no Module::Name passed as an argument. E.G.\n\t perl $0 Module::Name\n") unless $#ARGV == 0; + +my $module = shift @ARGV; + +my $installed_modules = ExtUtils::Installed->new; + +# iterate through and try to delete every file associated with the module +foreach my $file ($installed_modules->files($module)) { + print "removing $file\n"; + unlink $file or warn "could not remove $file: $!\n"; +} + +# delete the module packfile +my $packfile = $installed_modules->packlist($module)->packlist_file; +print "removing $packfile\n"; +unlink $packfile or warn "could not remove $packfile: $!\n"; +