Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The output is:#!/usr/bin/perl use strict; my %hash = ( 'snake' => 1, 'dog' => '2', 'zebra' => '3' ); print join ',', keys %hash;
snake,dog,zebra
So, I would like to be able to specify the output in the keys of the hash.dog,zebra,snake
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Specify Output of Keys in Hash
by davido (Cardinal) on Jul 13, 2011 at 20:57 UTC | |
|
Re: Specify Output of Keys in Hash
by AnomalousMonk (Archbishop) on Jul 13, 2011 at 20:09 UTC | |
|
Re: Specify Output of Keys in Hash
by i5513 (Pilgrim) on Jul 13, 2011 at 20:08 UTC | |
by bart (Canon) on Jul 14, 2011 at 11:32 UTC | |
|
Re: Specify Output of Keys in Hash
by bart (Canon) on Jul 14, 2011 at 11:37 UTC |