Re: if statement printing when it shouldnt :)

2001-06-04 Thread Curtis Poe
> if ( $viewtag = "1" ) { > print "The value of \$view was $view\n"; > } There are a few problems with that. First, you generally want a double equals '==' with a numeric comparison. You are assigning the value of "1" to $viewtag with returns "1" as the result which automatically evaluates

Re: if statement printing when it shouldnt :)

2001-06-04 Thread Randal L. Schwartz
> "You" == <[EMAIL PROTECTED]> writes: You> if ( $viewtag = "1" ) { You> print "The value of \$view was $view\n"; You> } That will print all the time. You are assigning 1 to $viewtag, and that's always true. Maybe you wanted == instead of =? -- Randal L. Schwartz - Stonehenge Consult

Re: if statement printing when it shouldnt :)

2001-06-04 Thread Timothy Kimball
[EMAIL PROTECTED] wrote: : if ( $viewtag = "1" ) { : print "The value of \$view was $view\n"; : } : : i would have thought that the second statement would not print since the : form had not been "submitted". however, instead, the if statements' print : does get stuck into the html. A pernicio

if statement printing when it shouldnt :)

2001-06-04 Thread charles
i currently have a form that is generated by the perl script panel.pl within the html, i have: http://localhost/cgi-bin/panel.pl"; method="post"> View the Current List of Aliases also in the html, i have: if ($formdata{view_name}) { $view = $formdata{view_name}; $viewtag = "1"; } and