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


YVDHOVE-List documentation  | view source Contained in the YVDHOVE-List distribution.

Index


SYNOPSIS

Top

  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

Top

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

EXPORT

Top

None by default.

METHODS

Top

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

Top

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

AUTHORS

Top

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

BUGS

Top

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

COPYRIGHT AND LICENSE

Top


YVDHOVE-List documentation  | view source Contained in the YVDHOVE-List distribution.