Ask a Question related to PERL Beginners, Design and Development.
-
Li Ngok Lam #1
I don't understand why this happen
open my $fh, "<", "items/list.db";
print while (<$fh>);
close $fh;
This is suppose to printout the content in items/list.db ,
but why I get somthing like "GLOB(0x162aca7)" ??
Thanks in advise.
Li Ngok Lam Guest
-
Why does this happen?
:confused; Hi, I need a little help. I installed Adobe Shockwave to play a game on the internet. The game suggests that I use Internet explorer... -
what happen with msconfig???
what happen with msconfig??? I can't found it??? -
What happen when two client connect FCS at the same time
In my mind, application.onConnect is the same as windows message queue. All the event and user define function in server application is only process... -
is freehand a class action waiting to happen?
I wonder if there are as many ship-jumpers on the Adobe forums as there always seem to be on Macromedia's? I manage to get around in Freehand 10... -
What will happen to OpenServer...
I was curious to see that SCO claimed a large company had purchased SCO licences for Linux installations. SCO refused to reveal the name but... -
James Edward Gray II #2
Re: I don't understand why this happen
On Monday, August 18, 2003, at 06:10 AM, Li Ngok Lam wrote:
I can't test it right this second, but I'm guessing it's the my() call> open my $fh, "<", "items/list.db";
inside of the open. Try this:
my $fh;
open $fh, '<', 'items/list.db' or die "File error: $!";
print while $fh;
close $fh;
Hope that helps.
James
> print while (<$fh>);
> close $fh;
>
> This is suppose to printout the content in items/list.db ,
> but why I get somthing like "GLOB(0x162aca7)" ??
>
> Thanks in advise.James Edward Gray II Guest
-
Li Ngok Lam #3
Re: I don't understand why this happen
>
It just the same as open my $fh =)> my $fh;
> open $fh, '<', 'items/list.db' or die "File error: $!";
Hmm............. I guess this is not a 'read' argument> print while $fh;
Thanks in advise anyway =)
Li Ngok Lam Guest
-
James Edward Gray II #4
Re: I don't understand why this happen
On Monday, August 18, 2003, at 08:10 AM, Li Ngok Lam wrote:
Save that it reads a little better, I think, and checks errors.>>>
>> my $fh;
>> open $fh, '<', 'items/list.db' or die "File error: $!";
> It just the same as open my $fh =)
You're right, I meant:>>> print while $fh;
> Hmm............. I guess this is not a 'read' argument
>
> Thanks in advise anyway =)
print while <$fh>;
Sorry about that.
James
James Edward Gray II Guest



Reply With Quote

