thendal
Programmer
- Aug 23, 2000
- 284
Hai guys!
I have a flat file
1|A|here comes the text|yes|values2|values3|values4
2|B|here comes the text|no|values2|values3|values4
3|B|here comes the text|yes|values2|values3|values4
4|A|here comes the text|no|values2|values3|values4
5|c|here comes the text|yes|values2|values3|values4
6|B|here comes the text|no|values2|values3|values4
Its a huge flat file.
I need to display all the A's and B's and C's as a separate group
Like
A results
1|A|here comes the text|yes|values2|values3|values4
4|A|here comes the text|no|values2|values3|values4
B results
2|B|here comes the text|no|values2|values3|values4
3|B|here comes the text|yes|values2|values3|values4
C results
5|c|here comes the text|yes|values2|values3|values4
If iam using a database i can use a query
like
select * from where name=A;
Is there any easy way to group the values other than putting a longer loops
Like
while(<filehandle>)
{
if($values collected from the flat file eq A)&&if($values collected from the flat file eq yes)
{
collecting the values in another separate array
}
}
Any help will be appriciated
Thanks
I have a flat file
1|A|here comes the text|yes|values2|values3|values4
2|B|here comes the text|no|values2|values3|values4
3|B|here comes the text|yes|values2|values3|values4
4|A|here comes the text|no|values2|values3|values4
5|c|here comes the text|yes|values2|values3|values4
6|B|here comes the text|no|values2|values3|values4
Its a huge flat file.
I need to display all the A's and B's and C's as a separate group
Like
A results
1|A|here comes the text|yes|values2|values3|values4
4|A|here comes the text|no|values2|values3|values4
B results
2|B|here comes the text|no|values2|values3|values4
3|B|here comes the text|yes|values2|values3|values4
C results
5|c|here comes the text|yes|values2|values3|values4
If iam using a database i can use a query
like
select * from where name=A;
Is there any easy way to group the values other than putting a longer loops
Like
while(<filehandle>)
{
if($values collected from the flat file eq A)&&if($values collected from the flat file eq yes)
{
collecting the values in another separate array
}
}
Any help will be appriciated
Thanks