#! /usr/bin/perl -w use strict; open (INFILE, $ARGV[0]) or die "unable to open file"; open (OUTFILE, $ARGV[1]) or die "unable to open file"; my $line; my @derivative = replace($line); print "@derivative\n"; sub replace { $line = @_; while (<INFILE>) { $line = $_; chomp ($line); $line =~ s/data//; $line =~ s/=//; $line =~ s/detector//; } return $line; }
In reply to sub-routines by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |