Debbie - You probably want to use references. A situation very similar to
yours is covered in one of the perl documentation pages: type "perldoc
perlreftut" on your command line.
HTH,
Bill.
On 2001.07.24 12:03 Debbie Christensen wrote:
> I am brand new to perl; I am only on chapt 4 of the learning perl book.
> My
> boss has already given me a project to do that I am really struggling
> with.
> I know you are all really busy, but I would really appreciate any help
> you
> can give.
>
> I have a text file that looks something like this
>
> OH: 702
> PA: 702
> ND: 702
> NJ :703
> NY: 703
> Ca: 703
>
>
> #my simple program
>
> open(STATES,"state.txt")||
> die "can't open state:";
> while ($line = <STATES>)
> {
> print $line;
> }
> close STATES;
>
>
> I am able to open the file and read it with no problem. Where I get lost
> is
> My boss wants the data to come out like
> 702 OH, PA, ND
> 703 NJ, NY, CA
>
> I have looked up Faq questions and have looked through my books. I have
> even tried formating it with no luck. Any help you can give would be
> great.
>
>
>
>
>
>
> Thanks,
> Debbie Christensen
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]