You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I didn't try it on my linux box yet, i saw the problem in windows 98.
the perl -v gives me:
Version: 5.004_02
I split the bug in Introduction, Origin, Consequence
[Introduction]
I really, really, really hate the trash of perl when i write
html, well, just to do more easy for me that, i wrote a loop
to create a var for eachlink i may use.
[Origin]
This code will create a link for any language,
language+tool, and language+tool+toolsubs
for example if i have the language sp, and the
tool ms and the mssubs 'agr','pre','ver'. The
code will give a link for the sub
'sp','spms','spmspre','spmsver','spmsagr'
called $'A+subname'
<--- Start Code ---->
#
$cgi = "/cgi-bin/dmoz/dte.cgi";
@languages = ('sp','en');
@tools = ('ms');
@mssubs = ('agr','pre','ver');
foreach $lang (@languages){
my ($link) = "A" . $lang;
${A$link} = "<A HREF=\"${cgi}\?op=${lang}\">";
foreach $tool (@tools){
my ($link) = $link.$tool;
${$link} = "<A HREF=\"${cgi}\?op=${lang}${tool}\">";
$toolsubs = $tool."subs";
if (@${toolsubs}){
foreach $subs (@${toolsubs}){
my ($link) = $link.$subs;
${$link} =
"<A HREF=\"${cgi}\?op=${lang}${tool}${subs}\">";
}
}
}
}
<--- End of perl code -->
Then when i need to call a link to a sub trough
"op=sub_name", for example, if i need the link
to 'en', i'll use: $Aen .
[Consequence]
When you run the -w switch one of the checks are if there is a
variable used only once, i'm not a guru of programming and i
don't know how it checks but when i run it on my windoz box
over the cgi with the above code, the perl daemon said:
Name "main::_each_var_declared_by_my_code" used only once:
possible typo at det.cgi line... .
I guess that it's a bug, what do u think?, please tell me.
greets.
enan0
--
"Cuz they didn't know that was impossible, they did it!"
-= RareGaZz =- http://raregazz.acapulco.uagro.mx
,.·' Hven '·., http://www.hven.com.ve
Migrated from rt.perl.org#1928 (status was 'resolved')
Searchable as RT1928$
The text was updated successfully, but these errors were encountered: