changeset 1486:c62a576d53f4

Changed perl invocation to #! /usr/bin/env perl
author rotor <rotor>
date Fri, 18 Oct 2002 00:43:10 +0000 (2002-10-18)
parents 839f7fc26ae6
children d7a056cd692f
files conversion/mif2mnc/mif2mnc
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/conversion/mif2mnc/mif2mnc
+++ b/conversion/mif2mnc/mif2mnc
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl5 -w
+#! /usr/bin/env perl
 #
 # Andrew Janke - rotor@bic.mni.mcgill.ca
 # McConnell Brain Imaging Center
@@ -14,7 +14,10 @@
 # Mon Jan  7 14:18:37 EST 2002 - initial version
 # Wed Feb 13 16:22:05 EST 2002 - Added byte_swapping aka ana2mnc 
 
+require 5.0;
+
 use strict;
+use warnings "all";
 
 use Getopt::Tabular;
 $SIG{__DIE__} =  sub { &cleanup; die $_[0]; };
@@ -34,6 +37,7 @@
               );
 
 chomp(my($me) = `basename $0`);
+my($tmpfile) = "/tmp/$me-$$.raw";
 my($clobber) = 0;
 my($verbose) = 0;
 my(@opt_table) = (
@@ -47,9 +51,9 @@
 HELP
 
 my($Usage) = "Usage: $me [options] <in.MIF> <out.mnc>\n".
-             "       $me -help to list options\n";
+             "       $me -help to list options\n\n";
              
-my($miffile, $mncfile, $tmpfile, $files, $nfiles, @args, $history);
+my($miffile, $mncfile, $files, $nfiles, @args, $history);
 
 # create the history string
 chomp($history = `date`);
@@ -60,7 +64,6 @@
 &GetOptions (\@opt_table, \@ARGV) || exit 1;
 if ($#ARGV < 1){ die $Usage; }
 ($miffile, $mncfile) = @ARGV[0..1];
-$tmpfile = "/tmp/$me-$$.raw";
    
 if(!-e "$miffile"){ 
    die "$me: Couldn't find $miffile\n";