#!c:/pgg/bin/perl.exe -w
use strict;
##### Name: cc2p.pl
##### Version: 0.0.1.0
##### Author: pGG
##### Contact: y6cme@sohu.com [http://perl.3322.org/~pgg]
##### Licence: The license of Perl
##### Updated: 2003-2-8
my $old=shift||'cc2p.exe';
my $new=shift||'cc2p.ple';
open(FILE,$old);
binmode(FILE);
my $gh;
while(<FILE>){
$gh.=$_;
}
my $hmm=index($gh,'-e',0);
my $vov=index($gh,'dl_win32.c',0);
$hmm+=2;
$vov-=1;
my $len=$vov-$hmm;
close FILE;
open(OLD,$old);
binmode(OLD);
my $pgg;
seek(OLD,$hmm,1);
read(OLD,$pgg,$len,0);
$pgg=~s/\\\$/\$/g;
$pgg=~s/\\\{/\{/g;
$pgg=~s/\\\}/\}/g;
$pgg=~s/\\\\/\\/g;
$pgg=~s/\\\"/\"/g;
$pgg=~s/\\\@/\@/g;
open(NEW,">$new");
print NEW $pgg;
close OLD;
close NEW;
#enjoy
In reply to cc2p.pl
by pGG
in thread p_cc.pl
by Anonymous Monk
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.