All pastes #34900 Raw Edit

Untitled

public text v1 · immutable
#34900 ·published 2005-12-26 09:06 UTC
rendered paste body
I have a line in a perl script which says:

my $check="select count(li_id) as i from listitems where ((li_href=\"$link\" or li_text=\"$quotedtext\")
                        and li_stem=\"$stem\") and li_keyword=$kwid and li_userid=$usid";
                                        

This is line 230. When I run the script, I get a strange error which suggests that there is a whitespace before the $link (which there clearly isn't). There error looks like this - 


Scalar found where operator expected at ./script.pl line 230, near ""select count(li_id) as i from links where ((li_href=\ "$link"
        (Missing operator before $link?)
Backslash found where operator expected at ./script.pl line 230, near "$link\"
        (Missing operator before \?)
syntax error at ./script.pl line 230, near ""select count(li_id) as i from links where ((li_href=\ "$link"
Execution of ./script.pl aborted due to compilation errors.


Why is it putting this space in before $link? What's going on here?


christo