background preloader

Coding

Facebook Twitter

Problème authentification wget sur facebook.

Perl

Css. R. Website. Iphone. Perl Regular Expressions. Troubleshooters.Com and Code Corner Present Copyright (C) 1998-2001 by Steve Litt Without regular expressions, Perl would be a fast development environment. Probably a little faster than VB for console apps. With the addition of regular expressions, Perl exceeds other RAD environments five to twenty-fold in the hands of an experienced practitioner, on console apps whose problem domains include parsing (and that's a heck of a lot of them). Regular expressions is a HUGE area of knowledge, bordering on an art. Rather than regurgitate the contents of the Perl documentation or the plethora of Perl books at your local bookstore, this page will attempt to give you the 10% of regular expressions you'll use 90% of the time.

Regular expressions are a syntax, implemented in Perl and certain other environments, making it not only possible but easy to do some of the following: Complex string comparisons $string =~ m/sought_text/; # m before the first slash is the "match" operator. . Other Quirks . M. Perl Hash Howto. This how-to comes with no guaratees other than the fact that these code segments were copy/pasted from code that I wrote and ran successfully. Initialize a hash Assigning an empty list is the fastest way. Solution my %hash = (); Initialize a hash reference For a hash reference (aka hash_ref or href), assign a reference to an empty hash. my $hash_ref = {}; # ref will return HASH The great thing about this is that if before performing an actual assignment, you want to determine (using the ref operator) the type of thingy that a reference is pointing to, you can!...

Note If you treat the variable just as any scalar variable; and use the my declaration alone, or assign a value, ref will return the empty string. my $hash_ref; # not a hash ref!... Clear (or empty) a hash If you literally want to empty the contents of a hash: for (keys %hash) { delete $hash{$_}; } Clear (or empty) a hash reference for (keys %$href) { delete $href->{$_}; } Example #! Output Add a key/value pair to a hash Hash: Hash reference: Hi! cURL - Tutorial. cURL Docs Tutorial HTTP Scripting 1.1 Background1.2 The HTTP Protocol1.3 See the Protocol1.4 See the Timing1.5 See the Response 2.1 Spec2.2 Host2.3 Port number2.4 User name and password2.5 Path part Fetch a page HTML forms 4.1 Forms explained4.2 GET4.3 POST4.4 File Upload POST4.5 Hidden Fields4.6 Figure Out What A POST Looks Like HTTP upload HTTP Authentication 6.1 Basic Authentication6.2 Other Authentication6.3 Proxy Authentication6.4 Hiding credentials More HTTP Headers 7.1 Referer7.2 User Agent Redirects 8.1 Location header8.2 Other redirects Cookies 9.1 Cookie Basics9.2 Cookie options 10.1 HTTPS is HTTP secure10.2 Certificates Custom Request Elements 11.1 Modify method and headers11.2 More on changed methods Web Login 12.1 Some login tricks Debug 13.1 Some debug tricks References 14.1 Standards14.2 Sites 1. 1.1 Background This document assumes that you're familiar with HTML and general networking.

Curl is not written to do everything for you. 1.2 The HTTP Protocol The client, curl, sends a HTTP request. Or 3.