Gossamer Forum
Home : General : Perl Programming :

future reserved word

Quote Reply
future reserved word
following line in db.cgi:
Code:
elsif ($in{'massmail'}) { if ($per_massmail) { &massmail; } else { &html_unauth(massmail); } }
ran a perl checker and got following
Code:
Unquoted string "massmail" may clash with future reserved word at (line number above)
is it because i'm using input form variable massmail and i have a sub massmail ?
Quote Reply
Re: [delicia] future reserved word In reply to
What exactly are you trying to pass along here?

Code:
&html_unauth(massmail);

Is it a string? Is so, it should be quoted:

Code:
&html_unauth("massmail");

That's what it's complaining about :)

Cheers

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 Reply
Re: [Andy] future reserved word In reply to
that solved the problem. all the other lines just had html_unauthorized; instead of html_unauthorized(whatever). i have no idea why (massmail) got in there. thanks!
Quote Reply
Re: [delicia] future reserved word In reply to
Probably a copy and paste error :) I expect the reason you didn't get a fatal error, is that you have a function with the same name? (judging by the code a little bit further back, where you DO call a function)

Cheers

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!