1000 |
|
|
1001 |
=cut |
=cut |
1002 |
|
|
|
sub frec { |
|
|
my @out = rec(@_); |
|
|
warn "rec(",dump(@_),") has more than one return value, ignoring\n" if $#out > 0; |
|
|
return shift @out; |
|
|
} |
|
|
|
|
1003 |
sub rec { |
sub rec { |
1004 |
my @out; |
my @out; |
1005 |
if ($#_ == 0) { |
if ($#_ == 0) { |
1016 |
} |
} |
1017 |
} |
} |
1018 |
|
|
1019 |
|
=head2 frec |
1020 |
|
|
1021 |
|
Returns first value from field |
1022 |
|
|
1023 |
|
$v = frec('200'); |
1024 |
|
$v = frec('200','a'); |
1025 |
|
|
1026 |
|
=cut |
1027 |
|
|
1028 |
|
sub frec { |
1029 |
|
my @out = rec(@_); |
1030 |
|
warn "rec(",dump(@_),") has more than one return value, ignoring\n" if $#out > 0; |
1031 |
|
return shift @out; |
1032 |
|
} |
1033 |
|
|
1034 |
=head2 regex |
=head2 regex |
1035 |
|
|
1036 |
Apply regex to some or all values |
Apply regex to some or all values |