in reply to Insert a variable without quotes
chomp $date; $html =~ m{\Q$date\E(.*?)..............}ism;
Key components: chomp, quotemeta (or the \Q and \E metacharacters, and omitting the /g modifier, which isn't doing anything for you here (you're only matching once, and not in list context anyway).
Also, you're working to hard at printing your output file.
open my $HTML, '>', 'myhtml.html' or die $!; print $HTML "$1\n"; close $HTML or die $!;
I don't think your content-type line is doing anything for you here unless you're creating a CGI script, in which case you probably wouldn't be opening an output file, but instead would just be printing to STDOUT (the default).
Dave
|
|---|