mirror of
https://github.com/marcin-szczepanski/jFuzzyLogic.git
synced 2024-12-18 16:35:27 +01:00
22 lines
345 B
Perl
22 lines
345 B
Perl
|
#!/usr/bin/perl
|
||
|
|
||
|
|
||
|
while( $l = <STDIN> ) {
|
||
|
chomp $l;
|
||
|
if( $l =~ /(.*?)\s*=\s*'(.*)'/ ) {
|
||
|
($var, $val) = ($1, $2);
|
||
|
print "$var\t:\t";
|
||
|
|
||
|
(@c) = split("", $val);
|
||
|
for( $i=0 ; $i <= $#c ; $i++ ) {
|
||
|
$char = $c[$i];
|
||
|
$lc = $uc = $char;
|
||
|
$lc =~ tr/[A-Z]/[a-z]/;
|
||
|
$uc =~ tr/[a-z]/[A-Z]/;
|
||
|
print "('$lc'|'$uc')";
|
||
|
}
|
||
|
print ";\n";
|
||
|
}
|
||
|
}
|
||
|
|