Mailing List Archive

Support open source code!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] filehandles in perl

Thanks Simon and Jake for the help.

--- Simon Cozens <> wrote:
> Hector Akamine:
> > I tried the following in perl
> > open (OUTF($i), ">$file[$i]"); # WRONG !!!
> Now you're just making up syntax. :)

mental lapsus, sorry :-)

>     open $handles[$i], ">$file[$i]" or die $!;

I had already found out how to make it (the way Simon
suggests). But I had a problem trying to do the same
with printf, I couldn't make it work with

printf $handles[$i] "$_"; # throws error

I had to make 

$temp = $handles[$i];
printf $temp "$_"; # same but different (?)

Anyway, it works.

Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links