in reply to Re: Subroutine question
in thread Subroutine question
1.I want this subroutine to be run as it readsmy $arg1 = "foo"; my $file1 = "file_1.gz; my $arg2 = "bar"; my $file2 = "file_2.gz"; sub file_processing { $script = "/export/home/ssesar/Perl/another_script.pl"; $open = "$script -e $arg1 $file1"; open(FILE1, "$open |") or die "can't do it\n"; while (<FILE1>) { chomp; next if /^\#/; next if /None/; next if /Unkno/; next if /unkno/; next if /NONE/; @_ = split ( /\n/, $_); @array1 = @_; } close FILE1; }
and...2. Then, I want this subroutine to be run a second time with the follo +wing changes: <CODE> $open = "$script -e $arg2 $file2"; open(FILE2, "$open |") or die "can't do it\n"; while (<FILE2>) {
@array2 = @_;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: Re: Subroutine question
by jreades (Friar) on Sep 21, 2000 at 07:49 UTC |