NAME

YVDHOVE::List - This Perl module provides "List" functions for the YVDHOVE framework

SYNOPSIS

use YVDHOVE::List qw(:all);

my $result01 = ArrayToDelimitedList(\@input01, ';', $debug);
my $result02 = HashToDelimitedList(\%input02, ';', $debug);
my $result03 = DelimitedListToArray($input03, ';', 1, $debug);
my $result04 = DelimitedListToArray($input04, ';', 2, $debug);
my $result05 = DelimitedListToHash($input05, ';', 1, $debug);
my $result06 = DelimitedListToHash($input06, ';', 2, $debug);
my $result07 = DelimitedKeyValuePairToHash($input07, '\|', $debug);

DESCRIPTION

This Perl module provides "List" functions for the YVDHOVE framework

EXPORT

None by default.

METHODS

ArrayToDelimitedList(ARRAYREF, CHAR, BOOLEAN);

my @input = ('A', 'B', 'C', 'D'); my $result = ArrayToDelimitedList(\@input, ',', $debug);

returns a string: 'A,B,C,D'

HashToDelimitedList(HASHREF, CHAR, BOOLEAN);

my %input = ( A => undef, B => undef, C => undef, D => undef); my $result = HashToDelimitedList(\%input, ',', $debug);

returns a string: 'A,B,C,D'

DelimitedListToArray(STRING, CHAR, INTEGER, BOOLEAN);

my $input = 'A,B,C,D'; my $result = DelimitedListToArray($input, ',', 1, $debug);

returns an ARRAYREF to an ARRAY: ('A', 'B', 'C', 'D')

my $input = 'A,B,C,D'; my $result = DelimitedListToArray($input, ',', 2, $debug);

returns an ARRAYREF to an ARRAY: ('A,B', 'C,D')

DelimitedListToHash(STRING, CHAR, INTEGER, BOOLEAN);

my $input = 'A;B;C;D'; my $result = DelimitedListToHash($input, ';', 1, $debug);

returns a HASHREF to a HASH: (A => undef, B => undef, C => undef, D => undef)

my $input = 'A;B;C;D'; my $result = DelimitedListToHash($input, ';', 2, $debug);

returns a HASHREF to a HASH: ('A;B' => undef, 'C;D' => undef)

DelimitedKeyValuePairToHash(STRING, CHAR, INTEGER, BOOLEAN);

my $input = 'A=B|C=D'; my $result = DelimitedKeyValuePairToHash($input, '\|', $debug);

returns a HASHREF to a HASH: (A => B, C => D)

SEE ALSO

See http://search.cpan.org/search?query=YVDHOVE&mode=all

AUTHORS

Yves Van den Hove, <yvdhove@users.sourceforge.net>

BUGS

See http://rt.cpan.org to report and view bugs.

COPYRIGHT AND LICENSE

Copyright (C) 2007 by Yves Van den Hove, <yvdhove@users.sourceforge.net>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.x or, at your option, any later version of Perl 5 you may have available.