perldoc -f tie 
Or
Why not use hash of array structure:
open(FH,$filename) || die "error message\n";
@file_content=<FH>;
close(FH);
$hash{FILE}=\@file_content;
###
After you can use your hash like this :
$myfile_arrayref=$hash{FILE};
foreach $line ( @{$myfile_arrayref} ){
#bla bla
#print "$line\n";
}
 
a beginner ...

José.
  Jolinar of Malkshur <[EMAIL PROTECTED]> a écrit : I wasn't asking for anyone to 
do my homework. I was just looking
for -suggestions- on how to do it a specific part that I got hung up on.
You know, pointers in the right direction?

Jolinar


"Drieux" wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> On Sunday, May 19, 2002, at 01:05 , Jolinar of Malkshur wrote:
>
> > Hi, I'm taking a Perl class at a local community college (Palomar, if
> > anyone
> > recognizes that) and I've gotten stuck on a problem. It's an online
class
> > and I don't have any contact with anyone else in the class.
>
> well be forewarned we do not like
>
> can you do my homework
>
> questions on G.P. { General Principle }
>
> and would prefer to be of assistance 'debugging' questions.
>
> > Anyway, what I'm trying to find out is if it is possible to open a file
> > and
> > put it in a hash. I know how to assign it to a variable, but I can't
seem
> > to make it work with a hash. I admit, I'm very new to this and am
> > probably
> > missing something really simple :(
>
> what you are looking for is either
>
> perldoc -f tie
>
> for how to use a tie function
>
> perldoc -f open
>
> so what you will want to do is become at home with
>
> perldoc perl
>
> and how to scoot around perl's internal documentation.
>
> For what it is worth feel free to read a bit of the
> stuff that I have plonked up on my webPages - as you
> can help me sort out what order it might best be in...
>
> ciao
> drieux
>
> http://www.wetware.com/drieux/pbl/
>
> --------------
>
> This space left intentionally blank.
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------
Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !

Reply via email to