30 mar 2010

Zamiana tekstów w perlu

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

print "Hello, World...";
$content = '<link rel="stylesheet" href="/zabytki,2,,,,informacje.html">';

$string = $content;
$string =~ s/\<link rel=\"stylesheet\" href=\"([^\"]+)\">/http:\/\/www.wolakorybutowa.pl$1/;
print $string;