DaveLord has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I'm trying to play with facebook using a perl script. I managed to login to facebook, and now I'm trying to search in facebook. I'm using LWP::UserAgent so I used a get-method

my $response=$browser-> get('',@header);
and it works, but I want to give a variable as a keyword like
$keyword=blabla; search.php?q=$keyword;
but the script searchs for the word "$keyword" as a searching keyword is there a way to implement a variable in the get-method?

Replies are listed 'Best First'.
Re: Authenticating Facebook - Perl
by dreadpiratepeter (Priest) on Aug 27, 2011 at 22:27 UTC
    You didn't show your code (bad monk!), but extrapolating from the results and your first example, my guess is that you have the argument to get in single quoted strings, so the $keyword variable is not getting interpolated.

    "Worry is like a rocking chair. It gives you something to do, but it doesn't get you anywhere."
Re: Authenticating Facebook - Perl
by Anonymous Monk on Aug 28, 2011 at 11:35 UTC
    Life is short so use WWW::Mechanize instead.