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 rob.di...@gmx.com 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 path cost 2          internal path cost 2       }    vlans

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 rob.di...@gmx.com 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 path cost 2          internal path cost 2       }    vlans

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

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 jimsgib...@gmail.com wrote: On 11/16/10 Tue  Nov 16, 2010  9:01 AM, Vincent Li vincent.mc...@gmail.com scribbled: Hi List, I have a text test.txt file looks like below: stp instance 0 {    interfaces 1.1 {          external path cost 2

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 shawnhco...@gmail.com 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. right, I only have

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 jimsgib...@gmail.com wrote: On 11/16/10 Tue  Nov 16, 2010  1:07 PM, Vincent Li vincent.mc...@gmail.com scribbled: On Tue, Nov 16, 2010 at 9:38 AM, Jim Gibson jimsgib...@gmail.com wrote: You need a parser to do this right. You might have some luck

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: 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 = '+', multiply

Re: [SPAM] perl 5.8.8 install problem

2007-05-08 Thread Vincent Li
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, then run the new installed cpan command to install modules that SA depends on Vincent Li http

Re: [SPAM] Re: perl 5.8.8 install problem

2007-05-08 Thread Vincent Li
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 additional commands

Re: [SPAM] Re: Accessing packed data structures

2007-03-14 Thread Vincent Li
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 solve the complex pack/unpack temlate and machine endianess problem Vincent Li http://bl0g.blogdns.com -- To unsubscribe, e-mail: [EMAIL PROTECTED

P0fq.pl and pack/unpack

2007-02-20 Thread Vincent Li
if $type == 1; die This connection is not (no longer?) in the cache.\n if $type == 2; # Display result print Genre: . $genre . \n; print Details : . $detail . \n; print Distance : . $dist . hops\n; print Link : . $link . \n; print Uptime : . $uptime . hrs\n; Thanks Vincent Li Blog

Re: finding matches in multiple arrays

2006-09-18 Thread Vincent Li
, 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.homelinux.org System Admin

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