Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maybe u know this bug, maybe not ;) -w undeclare var #980

p5pRT opened this issue Dec 20, 1999 · 1 comment

maybe u know this bug, maybe not ;) -w undeclare var #980

p5pRT opened this issue Dec 20, 1999 · 1 comment


Copy link

p5pRT commented Dec 20, 1999

Migrated from (status was 'resolved')

Searchable as RT1928$

Copy link

p5pRT commented Dec 20, 1999


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

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.

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
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 .

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.


"Cuz they didn't know that was impossible, they did it!"
-= RareGaZz =- http​://
,.·' Hven '·., http​://

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant