scalar %hash

2007-03-30 Thread jonatan perry
Hi you all :-) my name is Jonatan, I am new it this lists. I was wondering, why do print scalar %hash; return x/y result? what it mean? thanks :-)

Re: scalar %hash

2007-03-30 Thread Boga Srinivas
print scalar %hash; return x/y result? what it mean? thanks :-) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

scalar / hash problem in HTML::Parser

2008-02-24 Thread Tim Bowden
Hi all, I'm using HTML::Parser to process files containing snippets of html looking like: First optionAnother choicepick me I'm wanting to create a hash of option value, name pairs. Ie, 1 => "First option",2=>"Another choice" and so on. Problem is, I don't know how to handle the hash returned i

Re: scalar / hash problem in HTML::Parser

2008-02-25 Thread Tim Bowden
Making progress. Needed to understand hash references, and how to de-reference them. Tim Bowden On Mon, 2008-02-25 at 14:54 +0900, Tim Bowden wrote: > Hi all, > > I'm using HTML::Parser to process files containing snippets of html > looking like: > First optionAnother > choicepick me > > I'm w

Re: scalar / hash problem in HTML::Parser

2008-02-25 Thread Chas. Owens
On Mon, Feb 25, 2008 at 9:01 AM, Tim Bowden <[EMAIL PROTECTED]> wrote: > Making progress. Needed to understand hash references, and how to > de-reference them. snip Quick cheat sheet: #make a hash reference my $ref = \%hash; my $ref = { key1 => "val1", key2 => "val2" }; my $ref = { %hash }; #

Re: scalar / hash problem in HTML::Parser

2008-02-25 Thread MK
On 02/25/2008 09:01:27 AM, Tim Bowden wrote: -> Making progress. Needed to understand hash references, and how to -> de-reference them. delete($HASH{$KEY}); if that's what you mean; good luck with the stupid stick (i hope it ain't me) -> -> Tim Bowden -> -> On Mon, 2008-02-25 at 14:54 +0900

Re: scalar / hash problem in HTML::Parser

2008-02-25 Thread Tim Bowden
Thanks Chas, most useful. Regards, Tim Bowden On Mon, 2008-02-25 at 09:55 -0500, Chas. Owens wrote: > On Mon, Feb 25, 2008 at 9:01 AM, Tim Bowden <[EMAIL PROTECTED]> wrote: > > Making progress. Needed to understand hash references, and how to > > de-reference them. > snip > > Quick cheat sheet:

Re: scalar / hash problem in HTML::Parser

2008-02-25 Thread Tim Bowden
I need to find a way to get HTML::Parser return the text between the tag caught by the start_h handler and the related closing tag. Could someone please point me in the right direction? Cut down code thus far: #!/usr/bin/perl -wT use strict; use HTML::Parser; my %choices; my $file = 'test_snipp