Oliver, :) the below code works.... my $content = $request->content; print "content: $content\n";
but this doesn't work print "content: ".$request->content."\n"; Anyways, why do u have to assign to a var and print ? -----Original Message----- From: Oliver Schnarchendorf [mailto:[EMAIL PROTECTED] Sent: Friday, April 02, 2004 1:46 PM To: Bajaria, Praful Cc: '[EMAIL PROTECTED]' Subject: RE: New to Perl On Fri, 2 Apr 2004 12:19:32 -0800 , Bajaria, Praful wrote: > However, when I print > print "content $request->content \n"; I get "content > HTTP::Request=HASH(0x8546b3c)->content" > and print "$response->message \n"; give me "message > HTTP::Response=HASH(0x8546b60)->message" > > Am I doing something wrong here ? Yes... but unknowingly. You are trying to print what a hash function returns ($hash->function). The problem is that perl doesn't see it this way. It will just print the data type of the hash variable (HASH(0x0000000)) and see everything following the hash variable (->function) as normal text. There are a few ways around this. The easiest two for you are (a) Store the value returned by the hash-function in another variable before you use it: my $content = $request->content; print "content: $content\n"; (b) Use the perl way of concatenating strings with '.''s: print "content: ".$request->content."\n"; thanks /oliver/ BTW. You might want to look into buying a book on learning perl. There good ones out there are: Learning Perl, Randel Schwartz Beginning Perl, Simon Cozens