RE: passing arguments to a subroutine to try and match two fields in a text file

2003-01-17 Thread wiggins
See inline. On Fri, 17 Jan 2003 11:01:58 -0500, "Le Blanc, Kerry (Kerry)" <[EMAIL PROTECTED]> wrote: > I think I am getting close. With much help I have been able to tweek my original >code down quite a bit. For the most part, everything is worki

Re: passing arguments to a subroutine to try and match two fields in a text file

2003-01-17 Thread Rob Dixon
[EMAIL PROTECTED] wrote: >> open (FH, './fai.txt') || die "Cannot open file: ($!)"; >> my @parts = ; >> my @rev = ; > > This stores two copies of the file in memory, do you need two copies? > It doesn't actually. The first assignment leaves you at end-of-file so subsequent reads fail. @parts wi

RE: passing arguments to a subroutine to try and match two fields in a text file

2003-01-17 Thread Le Blanc, Kerry (Kerry)
I made some changes. Now I get an error message. The message says "Can't use string ("") as an ARRAY ref while "strict refs" in use" Here is the code as it stands now, with changes. #!/usr/bin/perl -w use strict; use Data::Dumper; use diagnostics -verbose; print "Enter the Part Number you w

Re: passing arguments to a subroutine to try and match two fields in a text file

2003-01-17 Thread Rob Dixon
Le Blanc wrote: > I made some changes. Now I get an error message. > > The message says "Can't use string ("") as an ARRAY ref while "strict > refs" in use" > > Here is the code as it stands now, with changes. > > #!/usr/bin/perl -w > use strict; > use Data::Dumper; > use diagnostics -verbose; > >