Core Function Keys

From Sputnik Wiki
Jump to: navigation, search
Keys( <array>, <flag> )

Contents

Description

Create an array containing all KEYS from a Hash (Dictionary)

Parameters

array

The array to use.

flag

Limiter

0 = Return all keys (default)
1 = Return all hash keys (strings only)
2 = Return all array keys (numeric only)

Return Value

Success: A new array containing any/all keys.

Failure: Returns empty array.

Remarks

None.

Example

my $array = array( "One" => "Cat", "Two" => "Fire", "Three" => "FoX", "Four" => "Water" );
my $Keys = Keys( $array );
foreach( $Keys as $Key )
{
	println( "Key: $Key" );
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox