T
Todd Anderson
Hello,
I have a script that needs to open a fat file > determine which lines
represent lines say 251-260 (@billingnumber) and ($yes_row)> and which
lines represent the ignored lines ($hold_row) > then do a bunch of stuff
to the lines i want ($yes_row).
The code below isn't finding the yes_lines. (probably if($billingnumber
ne "$e_number"){ is wrong.)
Any help is appreciated.
Thanks in advance for your help.
open (USERS, "$file") || &billerror
("$file Billing Notice" );
flock(USERS, 2);
while (<USERS>)
{
$line = $_;
chomp $line;
@line = $line;
@fields = split (/\|/, $line);
$billingnumber = @billingnumber;
foreach $line (@line){
$e_number++;
if($billingnumber ne "$e_number"){ # Save all the ignored lines
$hold_row .="$line\n"; }
else{ $yes_row .="$line\n"; #find the lines i want
@yes_row = $yes_row;
}#else
}#e_number
foreach $line2 (@yes_row){
chomp $line2;
@fields = split (/\|/, $line2);
#do a bunch of stuff to yes lines
}# foreach line2
}#while
flock(USERS, 8);
close (USERS);
I have a script that needs to open a fat file > determine which lines
represent lines say 251-260 (@billingnumber) and ($yes_row)> and which
lines represent the ignored lines ($hold_row) > then do a bunch of stuff
to the lines i want ($yes_row).
The code below isn't finding the yes_lines. (probably if($billingnumber
ne "$e_number"){ is wrong.)
Any help is appreciated.
Thanks in advance for your help.
open (USERS, "$file") || &billerror
("$file Billing Notice" );
flock(USERS, 2);
while (<USERS>)
{
$line = $_;
chomp $line;
@line = $line;
@fields = split (/\|/, $line);
$billingnumber = @billingnumber;
foreach $line (@line){
$e_number++;
if($billingnumber ne "$e_number"){ # Save all the ignored lines
$hold_row .="$line\n"; }
else{ $yes_row .="$line\n"; #find the lines i want
@yes_row = $yes_row;
}#else
}#e_number
foreach $line2 (@yes_row){
chomp $line2;
@fields = split (/\|/, $line2);
#do a bunch of stuff to yes lines
}# foreach line2
}#while
flock(USERS, 8);
close (USERS);