Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Use code2html
$tmp.='\tmpcode2html'; $tmp=~s#\\#\\\\#g; $clp=Win32::Clipboard(); $it=$clp->Get(); open(CH,\"^|perl -S code2html -v -lperl -ohtml-dark ^>$tmp\") or die $!; print CH $it; close CH; $tmp=~s#\\\\#/#g; open(TF,$tmp); read(TF,$it,(-s $tmp));$clp->Set($it); unlink $tmp;" Please note that this looks all wrong to UNI* gurus who see the quoting through typical shell rules that apply there; Win is different and there's a couple of not-well-known Windoze shell escaping tricks demonstrated in this code, as well. Also shows how to open a pipe to a process to be written to by Perl, has the ugly kludge of writing a tmp file -- if anyone knows a *Windoze*-workable way to avoid this please comment. In reply to Perl4Win32: prettify code syntax by Intrepid
|
|