Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

jensen

« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS 

perl grep dir and filename

// description of your code here

   1  
   2  my($directory, $filename) = $text =~ m/(.*\/)(.*)$/;
   3  print "D=$directory, F=$filename\n
   4  

perl http post

use HTTP::Request::Common qw(POST);
use LWP::UserAgent;

my $user = "user";
my $pass = "pass";

my $browser = LWP::UserAgent->new();

my $responde = HTTP::Request->new(POST => "http://www.sito.com/index.php");
$responde->content_type("application/x-www-form-urlencoded");
$responde->content("user=" . $user . "&pass=" . $pass);

$browser->request($responde)->as_string
« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS