give us some options.. maybe someone else will GetOpt us
authorJason Etheridge <jason@esilibrary.com>
Wed, 24 Sep 2008 13:06:01 +0000 (13:06 +0000)
committerJason Etheridge <jason@esilibrary.com>
Wed, 24 Sep 2008 13:06:01 +0000 (13:06 +0000)
make1per

index 0fbc1f2..80c25c3 100755 (executable)
--- a/make1per
+++ b/make1per
@@ -1,7 +1,10 @@
 #!/usr/bin/perl
 
-open IN, '<', 'incoming.renumbered.mrc.xml';
-open OUT,'>', 'incoming.renumbered.1per.xml';
+my $infile = $ARGV[0] || 'incoming.renumbered.mrc.xml';
+my $outfile = $ARGV[1] || $infile . '.1per.xml';
+
+open IN, '<', $infile;
+open OUT,'>', $outfile;
 
 $seenrec  = 0;
 $stripcol = 0;
@@ -16,4 +19,4 @@ while (<IN>) {
   }
   s/\n// unless m|^</record|;
   print OUT;
-}
\ No newline at end of file
+}