On Wed, Jan 21, 2004 at 12:40:39AM -0500, Steve Grazzini wrote: > But you have a syntax error as well, because the hash-dereference > <$self->{filehandle}> > ^......^ Ahh, I didn't notice that at all, I was wondering why it was complaining about it...shoulda twigged :)
> You've already found one solution (put the filehandle in a simple > scalar variable) but you could also call readline() explicitly: > my $incoming = readline $self->{filehandle}; Hmm, I do like that notation. > You can use shift() inside the dereference if you add parens: > my @bar = @{ shift() }; OK, I had tried my @bar = @{ shift }; but that doesn't work. I'll start using shift() I think, as that looks best to me. > Or you can assign the hash/array references to typeglobs. > *bar = shift; # sets @bar, if $_[1] is an array reference > *baz = shift; # sets %baz, if $_[2] is a hash reference I may avoid this one, it looks like it is too easy to get in trouble with...:) > my $bar = shift; > push @$bar, 42; # or whatever I tried this, but for some reason it didn't do what I wanted. I may have just done it wrong I guess. As for the method Roberto mentioned, of dereferencing later on, I had thought about that, but found it too verbose. Thanks for the help! -- Robin <[EMAIL PROTECTED]> JabberID: <[EMAIL PROTECTED]> Hostes alienigeni me abduxerunt. Qui annus est? PGP Key 0x776DB663 Fingerprint=DD10 5C62 1E29 A385 9866 0853 CD38 E07A 776D B663
pgp00000.pgp
Description: PGP signature