... $("#send").click(function(){ $.ajax({ type: 'POST', url: 'process.pl?first=&last=', dataType: "json", success: function(data) { if(data){ alert("We pass!"); } }, error: function() { alert("We have a problem!"); } }); }); ... #### #!/usr/bin/perl use strict; use warnings; use CGI; my $q = new CGI; my $first = $q->param("first"); my $last = $q->param("last"); print "F=$first - L=$last\n"; exit; #### ... url: 'process.pl? ', ... #### ... my ($first, $last ) = @ARGV; print "F=$first - L=$last\n"; ...