develooper Front page | perl.beginners | Postings from April 2008

blessing a hash

Thread Next
From:
perl pra
Date:
April 15, 2008 06:55
Subject:
blessing a hash
Hi Gurus,

How can I bless a hash.

below is my code:

package load;

use strict;
use warnings;

sub new {

                      my $class=shift;
                      my %samp=('1' => "xxx", '2' => "yyyy");

                 }

sub print {

                      here i need to print $samp{1}


                }



1;

hwo can i print $samp{1} in print subroutine

Thanks in Advance

Siva


Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About