in reply to How do i get the variables to actually get in here....

At least part of your problem seems to be with while (defined(<>)). The <> takes a line from the filehandle, and then you test it for being defined, and (continue to) loop if it is. Unfortunatly, unlike using while(<>) it doesn't actually assign the value into $_. To do that you can use while (defined($_=<>)), but that's exactly equivilent to while(<>).

I would advise that you look at using split, instead of regex for this task. It looks like it probably would be better suited for this data.

Replies are listed 'Best First'.
Re: Re: How do i get the variables to actually get in here....
by krujos (Curate) on Nov 07, 2001 at 02:53 UTC
    Split would be nice and easy but alas my prof has said its "off limits" for this project