hya,
On Mon, 11 Jun 2001, Charles Lu wrote:
> > When I run the following code with the Warning flag I get the following
> > message:
> >
> > Variable "%hash" will not stay shared....
> >
> > Here is my code:
> >
> > #trying to sort a Hash by Value
> > use strict;
my($var, @list, %hash);
sub function_one(); <<< define sub
if you don't, "use strict" with cause Perl to complain loudly...
> >
> > my @list = ('apple',12, 'peach', 2, 'pear', 45);
> > &function_one(@list);
> >
> > sub function_one {
> > my %hash = @_;
>
try using the "sort" function in Perl, makes life easy...
correct declarations make easy programming
/***** Experience is that marvelous thing that enables you to recognize a
mistake when you make it again.
Franklin P. Jones *****/