I went a different route, and not being in possession of a foursquare account, this is untested. I went with LWP instead:
Update: I guess since LWP is 'non-standard', this doesn't qualify</shrug>
#!/usr/bin/perl use LWP::UserAgent; sleep(rand()*600); my ($lt, $lg) = map { $ARGV[$_]+rand()*0.0001-0.00005 } 1..2; my $lwp = LWP::UserAgent->new(agent=>'Mozilla/5.0 (iPhone; U; CPU like + Mac OS X; en) '. 'AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1C10 Safari/4 +19.3'); $lwp->default_header(Authorization => 'Basic XXXXXX'); $lwp->post('http://api.foursqure.com/v1/checkin', {vid=>$ARGV[0],priva +te=>0, geolat=>$lt,geolong=>$lg});

And the slightly better looking version:
#!/usr/bin/perl use LWP::UserAgent; sleep( rand() * 600 ); my ( $lt, $lg ) = map { $ARGV[$_] + rand() * 0.0001 - 0.00005 } 1..2; my $lwp = LWP::UserAgent->new( agent => 'Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) ' . 'AppleWebKit/420+ (KHTML, like Gecko) Version/3.0' .' Mobile/1C10 Safari/419.3' ); $lwp->default_header( Authorization => 'Basic XXXXXX' ); $lwp->post( 'http://api.foursqure.com/v1/checkin', { vid => $ARGV[0], private => 0, geolat => $lt, geolong => $lg } );

In reply to Re: Nine-line Perl example of gaming a geolocation service and an open invitation to golf it by james2vegas
in thread Nine-line Perl example of gaming a geolocation service and an open invitation to golf it by mr_mischief

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.