in reply to First attempt at bringing in file for input/output
I didn't run this code, but I think it is a good general idea...#!/usr/bin/perl use warnings; use strict; use File::Basename; die "usage: $0 in_file\n" if @ARGV !=1; my $in_file = shift @ARGV; my($filename, $dir, $suffix) = fileparse($in_file); my $out_file = "$dir/$filename.out"; #change the suffix open my $FH_infile, '<', "$in_file" or die "Can't open $in_file"; open my $FH_outfile, '>', "$out_file" or die "Can't open $out_file";
|
---|