30 mar 2010

Wyrażenie regularne w perlu

#!/usr/bin/perl
#use strict;
#use warnings;

print "Hello, World...";
$content = '<link rel="stylesheet" href="/pogoda.091005.css">';

if($content =~ /^\<link rel=\"stylesheet\" href=\"\/(.+)\"/) {
    $styl_link = $1;
 print $styl_link;
}