my $ini_path = qw( /home/bob/Documents/html_template_data/3.values.ini + ); ... my $input_directory = qw( /home/bob/Documents/meditations/castaways/translate/data );
You are assigning a list to a scalar variable. This only works because there is only one element in the list. The correct way is to assign a scalar value to a scalar variable:
my $ini_path = '/home/bob/Documents/html_template_data/3.values.ini';
Or a list to a list:
my ( $ini_path ) = qw( /home/bob/Documents/html_template_data/3.values +.ini );
if ( $prompt1 eq ( "y" | "Y" ) ) { show_lang_codes(); }
$ perl -le'use Data::Dumper; my $x = ( "y" | "Y" ); print Dumper $x' $VAR1 = "y";
That code is only comparing $prompt1 to a lower case "y" but not to an upper case "Y". If you want to compare to both lower and upper case you can do the following:
if ( $prompt1 eq "y" || $prompt1 eq "Y" ) { show_lang_codes(); }
Or:
if ( lc $prompt1 eq "y" ) { show_lang_codes(); }
Or:
if ( $prompt1 =~ /\Ay\z/i ) { show_lang_codes(); }
In reply to Re: chunking up texts correctly for online translation
by jwkrahn
in thread chunking up texts correctly for online translation
by Aldebaran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |