Re: How to append to a file in a Archive::Zip object ?

2016-10-24 Thread Vincent Lequertier
On 10/22/2016 06:56 PM, Eric de Hont wrote: > Op 21-10-16 om 14:13 schreef Vincent Lequertier: >> This code creates a zip file which contains several files, all named >> 'test'. The thing I'm trying to achieve is to have all the output of >> commands being appended to a 'tes

How to append to a file in a Archive::Zip object ?

2016-10-21 Thread Vincent Lequertier
How can I do this properly ? I mean without having to create a temp file with a filehandle with all the output and adding the file to the zip after the for loop. Any help would be appreciated. Thanks -- Vincent Lequertier skysymbol.github.io -- To unsubscribe, e-mail: beginners-unsubscr...

Re: Problems displaying Perl structures

2016-02-22 Thread Vincent Lequertier
Le 18/02/2016 08:24, $Bill a écrit : > On 2/17/2016 03:15, Vincent Lequertier wrote: >> > > I'd get rid of the '$'s in front of '$group1' etc to avoid the '$ip =~ > s/^\$//;' below. > >> How can I have the following output? >> >> ,"10.10

Re: Problems displaying Perl structures

2016-02-17 Thread Vincent Lequertier
Didn't know about 2) and 5) thanks. Looping over the values makes sense as well. Regards, Le 17/02/2016 15:31, Shlomi Fish a écrit : > Hi Vincent, > > some comments on your code: > > On Wed, 17 Feb 2016 14:24:28 +0100 > Vincent Lequertier <s...@riseup.net> wrote:

Re: Problems displaying Perl structures

2016-02-17 Thread Vincent Lequertier
put = "\<table$count\>\,$value\n"; >print $output; > > } > > exit; > > Cheers, > > Miguel > > Este e-mail foi enviado a partir de um computador sem vírus protegido > pela Avast. > www.avast.com <https://www.avast.com/sig-email&g

Problems displaying Perl structures

2016-02-17 Thread Vincent Lequertier
t;{ips}) { print $table->{tablename}; print $vars{$entry}; } } My problem is that I don't understand what I should use to loop over 'ips' and what to put inside $vars{}. Is my data structure appropriate to my needs? Let me know If you need more information, if you need

Re: Display a hash in the order of an array

2015-07-21 Thread Vincent Lequertier
Le 2015-07-20 16:49, Charles DeRykus a écrit : On Mon, Jul 20, 2015 at 6:19 AM, Vincent Lequertier s...@riseup.net wrote: Thank you for the help, Charles! Unfortunately, I'm not able to figure out how to access the element of %ordered, despite some diggings in the perldoc (http

Re: Display a hash in the order of an array

2015-07-20 Thread Vincent Lequertier
Thank you, I thought about transforming my hash like your function transform_date_logs_to_ip_logs does but didn't found the way. I'm now trying to understand exactly how that works :-) -- Vincent Lequertier vincentlequertier.tk Le 2015-07-17 16:40, Brandon McCaig a écrit : Vincent: On Fri

Re: Display a hash in the order of an array

2015-07-20 Thread Vincent Lequertier
] } map { [$_, int sprintf(%03.f%03.f%03.f%03.f, split(/\./, $_))] } @ip; } So I'm looking for a way to iterate through the hash in the order of my array. Regards -- Vincent Lequertier vincentlequertier.tk Le 2015-07-17 15:50, Shawn H Corey a écrit : On Fri, 17 Jul 2015 15:11:13

Re: Display a hash in the order of an array

2015-07-20 Thread Vincent Lequertier
= 1; for my $key (keys %ordered) { print ip number $i : $key\n; for my $entry (@{$ordered{$key}}) { print $entry . \n; } ++$i; } But this module seems to be the way to go. -- Vincent Lequertier vincentlequertier.tk Le 2015-07-17 23:19, Charles DeRykus a écrit : Another

Display a hash in the order of an array

2015-07-17 Thread Vincent Lequertier
xxx' }; and an array of ip addresses, say @ip My question is how can I display the content of %hash in the order of @ip, assuming %hash has the same length as @ip ? Thank you -- Vincent Lequertier vincentlequertier.tk -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org

Re: How to check the index positions of an array element in perl in case of multiple occurance

2015-06-16 Thread Vincent Lequertier
tn_0 tn_1 tn_2 tn_3 tn_4 tn_5 tn_6 tn_7 tn7bcch tnbcch tsc userdata Best Regards Anirban. -- Vincent Lequertier s...@riseup.net .vincentlequertier.tk -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: last statement in a package

2015-05-21 Thread Vincent Lequertier
From http://perldoc.perl.org/perlmod.html#Perl-Modules, 1; is used to end with a true value --- Vincent Lequertier s...@riseup.net Le 2015-05-21 08:13, Sunita Pradhan a écrit : Hi Why a perl programmer use 1 or any number as last statement in module or package (like : 1;)?I checked without

Re: Perl array question

2015-05-06 Thread Vincent Lequertier
Thank you for the review, I'm learning and didn't know about this way of using hashes :-) --- Vincent Lequertier s...@riseup.net Le 2015-05-06 11:09, Shlomi Fish a écrit : Hi Vincent, On Wed, 06 May 2015 10:07:41 +0200 Vincent Lequertier s...@riseup.net wrote: It's a bit ugly, but here

Re: Perl array question

2015-05-06 Thread Vincent Lequertier
.= (split '-', $_)[1] . '' if $_ =~ /1900/; $num1902 .= (split '-', $_)[1] . '' if $_ =~ /1902/; } $num1900 =~ s/\$/;/; $num1902 =~ s/\$/;/; print $num1900 . \n; print $num1902; Cheers ! --- Vincent Lequertier s...@riseup.net Le 2015-05-06 09:19, Anirban Adhikary a écrit : Hi

Re: Not working example - from Mastering Perl book

2015-05-03 Thread Vincent Lequertier
as wrote in the book? --Octavian -- Vincent Lequertier s...@riseup.net -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: how to create a LO spreadsheet

2015-04-29 Thread Vincent Lequertier
Le 28/04/2015 21:23, lee a écrit : Vincent Lequertier s...@riseup.net writes: Le 2015-04-26 14:27, lee a écrit : Hi, how can I create a libreoffice spreadsheet with perl? There seem to be two modules for it, yet none of them seems to let you do it --- if they do, the documentation

Re: how to create a LO spreadsheet

2015-04-27 Thread Vincent Lequertier
. -- Vincent Lequertier s...@riseup.net -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

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
Vincent -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

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

What is the error in this code

2010-03-31 Thread Vincent Cannavale
#open a text file for reading, since opening for writing wipes the file open(INFILE, perlfile.txt); #assign the file, identified by the file handle to an array, then transform #the array into a scalar variable by joining each element in the array #(a line) with a new line character $variable =

Simple perl math caculation question

2007-07-10 Thread Vincent Li
in advance Vincent -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

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

regular expression question

2005-01-17 Thread Vincent
Hi all, I am new to perl, I receive some spam email with subject like st0ck, 0pportunities, gr0wth..., how can I match those words with number 0 in Thanks in advance -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

mech-dump...

2003-11-15 Thread Vincent A. Primavera
Hello, Using the mech-dump utility I get the error listed below when trying to access this page. I do have the login information. Does anybody know how I can supply it and get around this? -- Thank you, Vincent A. Primavera. M.I.S. Manager. Ralph Pill

Get the Architecture type

2003-07-07 Thread BUFFERNE,VINCENT (HP-France,ex1)
Hi, Within a perl script, I would like to get the architecture type of the machine (ia32, ia64, pa-risc...). Is there an equivalent routine to the shell call uname -a in Perl? Thanks, Vincent -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: How to measure Array or Hash's byte size ?

2003-04-04 Thread BUFFERNE,VINCENT (HP-France,ex1)
What's about: my @foo = ( '1', '2' ,'3' ); my $size = $#foo + 1; print table size $size\n; Ouput: table size 3 Vincent -Original Message- From: Li Ngok Lam [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2003 5:14 PM To: [EMAIL PROTECTED] Subject: How to measure Array or Hash's

RegExp and XML

2003-02-21 Thread Vincent O' Keeffe
. Does anyone have any idea of how to go about this if I assign the body to a variable like so? $msgbody = $pop-Body($i) # $pop being the instantiated POP connection object Thanks, Vincent

RE: Join problem

2002-10-20 Thread Vincent Lee
on @clean_array... Aloha = Beau. -Original Message- From: Vincent Lee [mailto:vjlee_us;yahoo.com] Sent: Thursday, October 17, 2002 1:48 AM To: [EMAIL PROTECTED] Subject: Join problem Hello All, I've got a problem with the JOIN function I've got a list of columns that gets returned from

Join problem

2002-10-18 Thread Vincent Lee
value? Is the database returning a null field in the first columns, is that why it's returning a comma? join (,,@columns); = Regards, Vincent __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com

Re: creating a string on the fly

2002-10-16 Thread Vincent Lee
--- Rob [EMAIL PROTECTED] wrote: Sorry Vincent I'm not sure what you're meaning. You've written GetColumns ($table). Does it return an array of column names as it should? - Original Message - From: Vincent Lee [EMAIL PROTECTED] To: Rob [EMAIL PROTECTED] Cc: [EMAIL PROTECTED

Re: creating a string on the fly

2002-10-16 Thread Vincent Lee
() or die error here.; $s-bind_columns(\$colname); while ($s-fetch()){ push (@columns, $colname); } return @columns; } --- Rob [EMAIL PROTECTED] wrote: Sorry Vincent I'm not sure what you're meaning

Re: creating a string on the fly

2002-10-15 Thread Vincent Lee
I'm starting with data in the database. It's SQL statements and I'm populating arrays in perl. I don't need to build a hash but the statement. I thought an array or hash would be the easiest. [EMAIL PROTECTED] wrote: Vincent I will have several suggestions, but I need to know what data

Re: creating a string on the fly

2002-10-15 Thread Vincent Lee
do without knowing more about what interface you have with the database. HTH Rob - Original Message - From: Vincent Lee [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, October 15, 2002 3:37 PM Subject: Re: creating a string on the fly I'm starting with data

RE: creating a string on the fly

2002-10-15 Thread Vincent Lee
; } print ) FROM $table;\n; } Which may be enough for you. GetTables() and GetColumns() are the first part, and I can't say any more about what these might do without knowing more about what interface you have with the database. HTH Rob - Original Message - From: Vincent Lee [EMAIL

Creating string on the fly

2002-10-14 Thread Vincent Lee
for the tables but then I want to test if the $table_name=keys (%col_hash) then print the columns... Anyone iwth some idea? = Regards, Vincent __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com

select multiple

2002-10-05 Thread Vincent van Kuler
=thirdComponent_4/OPTION /SELECT input type=submit value=Show_me /form Vincent -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Regexp

2002-09-19 Thread Panel Vincent - A53
Thank you all for your very accurate answers. Vincent. -Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 18, 2002 7:08 PM To: [EMAIL PROTECTED] Subject: Re: Regexp Sudarshan Raghavan wrote: On Wed, 18 Sep 2002, Panel Vincent

Regexp

2002-09-18 Thread Panel Vincent - A53
with $s which is wrong) Vincent Panel. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Regexp

2002-09-18 Thread Panel Vincent - A53
Why not splitting on whitespaces and joining the pieces together ? E.g. Because it won't work : michael mac douglas will give [EMAIL PROTECTED] not [EMAIL PROTECTED] Vincent. -Original Message- From: Thorsten Dieckhoff [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 18, 2002

Really newbie question

2002-08-30 Thread Panel Vincent - A53
I've made a script that looks like this #!/usr/bin/perl -w use Net::LDAP::LDIF; use Net::LDAP::Entry; $file= $ARGV[0]; open(LDIF, $file) || die Failed to open file $ARGV[0] : $!; $ldif = Net::LDAP::LDIF-new(LDIF); while (not $ldif-eof()) { $entry = $ldif-read_entry(); }; Perl is

LDIF file parsing

2002-08-27 Thread Panel Vincent - A53
address: in your dreams name: brad surname: pitt adress: there What should be the structure of my loop ? Do you know a complete script already written to parse such a file (can't find any on the net) ? Thanx, Vincent. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

64 bits and perl 5.6.1

2002-08-21 Thread BUFFERNE,VINCENT (Non-HP-France,ex1)
perl (compiled in 64 bits): do you know if it is possible ? Regards, Vincent -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

32 and 64 bits

2002-08-13 Thread BUFFERNE,VINCENT (Non-HP-France,ex1)
I want to write something like: if (64 bits platform) . else . Where the code has a different behaviour depending on the targeted platform (32 or 64 bits). Do you know a simple method to perform this test in Perl ? Thanks, Vincent -- To unsubscribe, e-mail: [EMAIL PROTECTED

XS and Shared Libraries

2002-07-17 Thread BUFFERNE,VINCENT (Non-HP-France,ex1)
statically a Shared Lib with another one just as you will do for an exectable ? Does somebody has already face this case ? What do you advice ? Thanks, Vincent -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

XS and Shared Lib

2002-07-05 Thread BUFFERNE,VINCENT (Non-HP-France,ex1)
working on HP-UX, but it should not make any deference. Do you have any idea what could be wrong ? Regards, Vincent -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

select and BIG FDS

2002-05-21 Thread VINCENT BUFFERNE
Does select support big FDS (File Descriptor). This means can we use handle larger than 2056 with select. For example: vec($rin,0,65536) = 1; select($rin, undef, undef, undef); Thanks, Vincent -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

using vec

2002-05-17 Thread VINCENT BUFFERNE
I am using vec($foo1, $foo2, $foo3). It seems that the value of $foo3 is limited to 2048 (with perl 5.004 or perl 5.6.1). Is it possible to use wider values: up to 60,000 ??? Thanks, Vincent -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

XS and Perl version

2002-04-25 Thread VINCENT BUFFERNE
I am using a XS wrapper with Perl 5.004. I am planning to go for Perl 5.6.1. Do I have to plan modifications within the XS code ? Thanks, Vincent -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Access MS SQL using DBI / DBD

2001-10-31 Thread Vincent Bouttier-Deslandes
someone help...Thanks in advance. Pathi -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Vincent Bouttier-Deslandes ([EMAIL PROTECTED]) Responsable du pôle Outils/Sécurité Tel: +33.3.28.37.78.47 - Fax : +33.3.20.67.58.43 -- To unsubscribe

Re: Perl script editor for NT/2000

2001-08-20 Thread Vincent Bouttier-Deslandes
: (864) 390-5195 Fax: (864) 964- Email: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Vincent Bouttier-Deslandes ([EMAIL

A Variant on the Recursive Copy - Funny Problem

2001-08-16 Thread Vincent Lim
Hello All, I am currently developing a script on Perl 5.001 in Windows 2000 but targeted for WIndows NT 4.0. I have scan through the list and seen the answer on File::*. Unfortunately, the perl version I have does not have the FIle::Path module (or is it?). Here's the purpose of my script.

Re: I have a list of Directories and FIles, how do I sort them out

2001-08-16 Thread Vincent Lim
Thanks Steven, Sorry about the missing code and program exposition. Please see my A Variant on the Recursive Copy - Funny Problem thread. Best regards. Vincent Lim Steve Howard wrote: It might be helpful if you posted at least the part of the code that is having trouble. it's difficult

I have a list of Directories and FIles, how do I sort them out

2001-08-15 Thread Vincent Lim
. Something is jinking the test and the -f does not work, so all my files always end up as directories in the target. What's wrong? Or is there a better way? TIA. Vincent -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Function Prototypes

2001-07-12 Thread Vincent
I'm reading the chapter on Subroutines in the camel book and have a question about the prototypes described on page 226. At first my understanding was, there should be a $ or @ for each parameter expected. Or a \@ or \$ for each reference expected. But one of the examples reads: sub mysplice