Re: How to filter out { } block in text file

2010-11-17 Thread Vincent Li
On Wed, Nov 17, 2010 at 3:26 AM, Rob Dixon wrote: > On 16/11/2010 17:01, Vincent Li wrote: >> >> Hi List, >> >> I have a text test.txt file looks like below: >> >> stp instance 0 { >>    interfaces 1.1 { >>          external p

Re: How to filter out { } block in text file

2010-11-17 Thread Vincent Li
On Wed, Nov 17, 2010 at 3:26 AM, Rob Dixon wrote: > On 16/11/2010 17:01, Vincent Li wrote: >> >> Hi List, >> >> I have a text test.txt file looks like below: >> >> stp instance 0 { >>    interfaces 1.1 { >>          external p

Re: How to filter out { } block in text file

2010-11-16 Thread Vincent Li
On Tue, Nov 16, 2010 at 2:14 PM, Jim Gibson wrote: > On 11/16/10 Tue  Nov 16, 2010  1:07 PM, "Vincent Li" > scribbled: > >> On Tue, Nov 16, 2010 at 9:38 AM, Jim Gibson wrote: > >>> >>> You need a parser to do this right. You might have some luc

Re: How to filter out { } block in text file

2010-11-16 Thread Vincent Li
On Tue, Nov 16, 2010 at 1:11 PM, Shawn H Corey wrote: > On 10-11-16 04:07 PM, Vincent Li wrote: >> >> My aim is to remove specific profile.*{} block from that file > > Yes, but if the {} blocks are nestable, then you can't do it with regular > expressions alone. &g

Re: How to filter out { } block in text file

2010-11-16 Thread Vincent Li
On Tue, Nov 16, 2010 at 9:38 AM, Jim Gibson wrote: > On 11/16/10 Tue  Nov 16, 2010  9:01 AM, "Vincent Li" > scribbled: > >> Hi List, >> >> I have a text test.txt file looks like below: >> >> stp instance 0 { >>    interfaces 1.1 { >>

How to filter out { } block in text file

2010-11-16 Thread Vincent Li
Hi List, I have a text test.txt file looks like below: stp instance 0 { interfaces 1.1 { external path cost 2 internal path cost 2 } vlans { internal vlan10 } } profile http http_global { defaults from http max header size 38912 encryp

Re: Simple perl math caculation question

2007-07-10 Thread Vincent Li
On Tue, 10 Jul 2007, Chas Owens wrote: On 7/10/07, Vincent Li <[EMAIL PROTECTED]> wrote: I am trying to experiment a simple perl math caculation script I wrote: #!/usr/bin/perl use strict; use warnings; my %operator = ( minus => '-', add =&g

Simple perl math caculation question

2007-07-10 Thread Vincent Li
I am trying to experiment a simple perl math caculation script I wrote: #!/usr/bin/perl use strict; use warnings; my %operator = ( minus => '-', add => '+', multiply => '*', divide => '/', ); my $big = 5; my $small = 2; for (values %operator) { my $result = $big $_ $small;

Re: [SPAM] Re: perl 5.8.8 install problem

2007-05-08 Thread Vincent Li
it running while I figure out what to do. I think spamd can run on seperate box, maybe it is easier/quicker to setup fresh SA on fresh box than fixing the broken perl on the production email server. Vincent Li http://bl0g.blogdns.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additiona

Re: [SPAM] perl 5.8.8 install problem

2007-05-08 Thread Vincent Li
as wrong. So, now I don't have a mod_perl for apache and my spamassassin won't run because of some strange perl error. Can someone shed some light on this for me... What should I do now? Why don't you get rid of all current perl and perl libraries and build from tarball source,

Re: [SPAM] Re: Accessing packed data structures

2007-03-14 Thread Vincent Li
need to pack and unpack to these elements are in hex format(0x0B 0x1C 0x34 etc). It is a string of hex bytes. I kindly request anyone to guide me in this. Thanks and Regards, Dharshana What about this one: http://search.cpan.org/~mhx/Convert-Binary-C-0.67/lib/Convert/Binary/C.pm I once used it to

P0fq.pl and pack/unpack

2007-02-20 Thread Vincent Li
e . "\n"; print "Details : " . $detail . "\n"; print "Distance : " . $dist . " hops\n"; print "Link : " . $link . "\n"; print "Uptime : " . $uptime . " hrs\n"; Thanks Vincent Li Bloghttp://bl0g.blogdns.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: finding matches in multiple arrays

2006-09-18 Thread Vincent Li
you asked, then I am dump :) -- Jeff Pang NetEase AntiSpam Team http://corp.netease.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> Vincent Li http://mcli.home

Add comment to a pattern matched file line

2006-01-10 Thread Vincent Li
Hi List: I have two files like this: file1: score CN_SUBJ_PROMOTE3.100 # [0.000..3.100] score CN_SUBJ_PROMOTION 3.600 # [0.000..3.600] score CN_SUBJ_PROVIDE3.000 # [0.000..3.000] file2: CN_SUBJ_PROMOTE CN_SUBJ_PROMOTION If string CN_SUBJ_PROMOTE exi