Fri Dec 07, 2018 8:15 pm Post
Tue Dec 11, 2018 12:57 pm Post
Code: Select all
<$custom:NameOfField>@@
Code: Select all
^@@\n
Code: Select all
@@\n
Wed Dec 12, 2018 12:07 pm Post
Code: Select all
open my $fh, '<', $ARGV[0] or die "Can't open file $ARGV[0]";
read $fh, my $file, -s $fh;
$file =~ s/replacedtext/replacedby/gm;
close $fh;
open my $fh, '>', $ARGV[0] or die "Can't open file for writing $ARGV[0]";
print $fh $file;
close $fh;
Code: Select all
$outputfilename = $ARGV[0];
$outputfilename =~ s/\.txt/.html/g;
open my $fh, '>', $outputfilename or die "Can't open file for writing $ARGV[0]";
$file =~ s/\n/<br>\n/gm;
$file =~ s/\*\*([^*]+)\*\*/<span class="bold">$1<\/span>/gm;
$file =~ s/\*([^*]+)\*/<span class="italic">$1<\/span>/gm;
$outputfile = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<style type="text/css">
p.p1 { width: 600px; margin: 0.0px 33.2px 0.0px 33.2px; text-align: justify; font: 12.0px "Avenir Next"; }
span.bold { font: 12.0px "Avenir Next Demi Bold"; }
span.italic { font-style: italic }
</style>
</head>
<body>
<p class="p1">
' . $file . '
</p>
</body>
</html>';
print $fh $outputfile;
close $fh;
system("open -a /Applications/TextEdit.app $outputfilename");
In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 5 minutes)
Most users ever online was 1048 on Mon Feb 06, 2012 9:07 pm
Users browsing this forum: No registered users and 3 guests