Re: [OT] Is this feasible in Perl??

2001-06-17 Thread will trillich

On Wed, Jun 13, 2001 at 06:57:45AM +0800, Gunther Birznieks wrote:
> My experience is that architecturally Perl cannot handle this. You should 
> switch to Java and use an Enterprise Java Bean to do all this for you.

you must have an interesting sense of humor.

-- 
I figure: if a man's gonna gamble, may as well do it
without plowing.   -- Bama Dillert, "Some Came Running"

[EMAIL PROTECTED]
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!



Re: [OT] Is this feasible in Perl??

2001-06-12 Thread Gunther Birznieks

My experience is that architecturally Perl cannot handle this. You should 
switch to Java and use an Enterprise Java Bean to do all this for you.

My hint to you is use a hash where the key is a SSN# to help you. Of 
course, your description of what you want to accomplish is quite ambiguous 
so who knows whether this will really help you.  But I notice you are 
attempting to do a lot of stuff with arrays when I think hash would help.

Anyway, this isn't the place to post non mod_perl questions anyway. Please 
find a normal Perl syntax mailing list please and do not clutter up this 
list with Perl newbie questions -- this is a mod_perl list not a Perl 
syntax list. Perl.com has links to a lot of these resources.

At 05:19 PM 6/12/01 -0400, F.H wrote:

>Hi All,
>I have a text file like this:
>
>Name ,123-43-4352, JX, 1234
>Sports,123-43-4352, SKI, BaseBall, swimming
>Hobbies, 123-43-4352, H1,H2, H3
>Hobbies, 123-43-4352, HH, HHH, 2
>Hobbies,123-43-4352, H1,H43
>
>Name ,223-63-9352, JX, 1234
>Sports,223-63-9352, SKI, BaseBall, swimming
>Hobbies, 223-63-9352, H1,H2, H3
>Hobbies, 223-63-9352, HH, HHH, 2
>Here is my issue, I am trying to access each record in this file by SSN
>ie: (223-63-9352)
>I want to be able to say:
>for SSN = 223-63-9352,  for Hobbies4 4th entry is HGFR.
>
>while ($line = ){
>
>
> @line = &parse_line(',',0,$line);
>   if ($line[0] =~ /^NAME/gi){
> $ssn = $line[1] ;
>   push(@ssns, $ssn);
>
>   }
>
> if ($line[0] =~ /^Sports/gi ){
>
>   push(@sports, $line)
>
> }
>
> if ($line[0] =~ /^Hobbies/gi){
>
>  push(@hobbies, $line)
>
>}
>
>for ($i = 0; $i<= $#ssns; $i ++)
>  {
>print "For  $ssns[$i]\n";
>
> for ($i = 0; $i <= $#Hobbies ; $i++){
>
>if ($Hobbies[$i] =~ $ssns[$i])
>{ print "Hobbies are: $Hobbies[$i]\n";}
>}
>
>
>I wanted to print out for each SSN corresponding SSN numbers but it's just
>not working!!! If this is feasible in Perl I'd appreciate if someone could 
>help.
>
>
>Thanks
>I.S
>
>__
>Get your own FREE, personal Netscape Webmail account today at 
>http://webmail.netscape.com/

__
Gunther Birznieks ([EMAIL PROTECTED])
eXtropia - The Open Web Technology Company
http://www.eXtropia.com/