Just got a weird error popping up
$word never introduced at xml_import2.cgi line 429.
$count never introduced at xml_import2.cgi line 429.
$new never introduced at xml_import2.cgi line 429.
$string never introduced at xml_import2.cgi line 429.
... its with this code (at least it seems to be)... I am just confused as to what the error means :(
sub capitalize {
my $string = $_[0];
if (!$string) { return; }
my @cut = split / /,$string;
my $new;
my $count = 0;
foreach my $word (@cut) {
$new = $new . ucfirst $word . " ";
}
chop $new; #get rid of trailing blank
$new =~ s/\// - /gi;
return $new;
}
TIA
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Quote:
@cut never introduced at xml_import2.cgi line 429. $word never introduced at xml_import2.cgi line 429.
$count never introduced at xml_import2.cgi line 429.
$new never introduced at xml_import2.cgi line 429.
$string never introduced at xml_import2.cgi line 429.
... its with this code (at least it seems to be)... I am just confused as to what the error means :(
Code:
# capitalize all the words in the given string. very useful. sub capitalize {
my $string = $_[0];
if (!$string) { return; }
my @cut = split / /,$string;
my $new;
my $count = 0;
foreach my $word (@cut) {
$new = $new . ucfirst $word . " ";
}
chop $new; #get rid of trailing blank
$new =~ s/\// - /gi;
return $new;
}
TIA
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!