Re: Need Help with File Processing

2003-03-19 Thread R. Joseph Newton
"R. Joseph Newton" wrote: Correction: > Huh? Where did this come from? After 20 minutes or so of contemplation, it occured > to me that one of the two fields [0.60] that you split 2.00 into, is equivalent to > the parameter for that field [0.3] time the quantity listed Joseph -- To un

Re: Need Help with File Processing

2003-03-19 Thread R. Joseph Newton
Gufranul Haque wrote: [snip] > I will try to explain the problem I am facing in detail: > > File to be processed (Input File) > > 10111 2.00 2.00 2.00 2.00 > 10111 2.00 2.00 2.00 2.00 > > Restriction First field to remain same. > > Parameter File > 1,0.3,0.5,1 > Each filed in the parameter file co

Re: Need Help with File Processing

2003-03-19 Thread John W. Krahn
[ Please do not top-post. Please remove the quoted text that is not applicable. Please use single-spaced formatting and indent your code properly. ] Gufranul Haque wrote: > > From: "John W. Krahn" <[EMAIL PROTECTED]> > > > > If you do need to modify the fields: > > > > use warnings; > > use

Re: Need Help with File Processing

2003-03-19 Thread Gufranul Haque
e - From: "John W. Krahn" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 18, 2003 5:27 PM Subject: Re: Need Help with File Processing > Gufranul Haque wrote: > > > > Perl Gurus, > > > > need some help with File Processing. I am

Re: Need Help with File Processing

2003-03-18 Thread John W. Krahn
Gufranul Haque wrote: > > Perl Gurus, > > need some help with File Processing. I am trying to process a file where each > line is treated as a record. The fileds in the record are separated by whitespaces. > The number of white spaces between two fields can be >=1. > > The idea is to read the in

Re: Need Help with File Processing

2003-03-18 Thread Stefan Lidman
Hello try this: #!/usr/bin/perl -w use strict; #always! my $FILE1 = <@ARGV>; print "$FILE1\n"; open INFILE, $FILE1 or die "Damn $!"; open OUTFILE, '> xyz.dat' or die "Cant open xyz.dat $!"; while(my $line = ){ my @out = split ' ', $line; my $count = @out; print "$count\n"; print

Need Help with File Processing

2003-03-18 Thread Gufranul Haque
Perl Gurus, need some help with File Processing. I am trying to process a file where each line is treated as a record. The fileds in the record are separated by whitespaces. The number of white spaces between two fields can be >=1. The idea is to read the input file, and copy it to an output fi