RE: Change file names

2004-03-10 Thread EUROSPACE SZARINDAR
> -Message d'origine- > De: Tomas Corral [mailto:[EMAIL PROTECTED] > Date: mercredi 10 mars 2004 13:07 > À: [EMAIL PROTECTED] > Objet: Change file names > > > Hi all: > > Because '@' is a special character for many interpreters. I'm > trying to > change the names of 100 files deleting

Archive::TAR with better performance ?

2004-03-10 Thread EUROSPACE SZARINDAR
Hi all, Is there a way to tar files without using the Archive::TAR module which is known to be very slow and ressource guzzler (comment in the faq). I am looking for a Perl module directly linked to the C library of tar to have almost the same performance and the power of perl ? Thanks in adv

RE: Logical problem with small script??

2004-03-09 Thread EUROSPACE SZARINDAR
Hi Gordon, why don't you use the power of pack and unpack >print unpack ("C",a) # returns 97 >print pack ("i", unpack ("C",A)+3) # returns D >print pack ("i*", map ( $_+=3 , (unpack ("C*",ABCD))) ) # returns DEFG hope it helps Michel -Message d'origine- De: Gordon Low

RE: packages and variables

2004-03-04 Thread EUROSPACE SZARINDAR
Hi Ralf, TMHO, you should create the $test before printing it. In fact, change print "1: $testThis::test\n"; into testMod::testThis(); and afterwards, the $test will be available. OR: having $test global is not so profitable because you want be able to have your pe

RE: sort from the smallest number to the highest number

2004-01-30 Thread EUROSPACE SZARINDAR
Hi, Here is an old answer to your problem from Randy W. Sims. Hope it will helps. Perhaps you would have to modify the sort to have an numerical. Michel S -Message d'origine- De: Randy W. Sims [mailto:[EMAIL PROTECTED] Date: vendredi 23 janvier 2004 10:53 À: Bjorn Van Blanckenberg Cc:

RE: Need help comparing lines in two files

2004-01-23 Thread EUROSPACE SZARINDAR
Hi Stuart, Have a look on CPAN (www.cpan.org) there are two wonderfull packages to do exactely what you are dreaming of : Algorithm::Diff Text::ParagraphDiff Have a nice day Michel -Message d'origine- De: Dan Anderson [mailto:[EMAIL PROTECTED] Date: vendredi 23 janvier 2004

RE: Regular Exprections

2003-11-25 Thread EUROSPACE SZARINDAR
Marcos, Try this : my $str = 'aaa--%%b%bb%%--ccc--%%ddd%%--'; $str =~ s/(-{2}\%{2})(.*?)(\%{2}-{2})/$1$3/g; print "Modified str = ".$str."\n"; you will get Modified str = aaa----ccc---- Is it what you want ?? Michel -Message d'origine- De: [EMAIL PROTECTED] [mailto:[EMA

Perl optimization tools

2003-11-19 Thread EUROSPACE SZARINDAR
Hi all, Are there tools like in C (lint, gconv, gprof) to know a little more about the perl execution. What could be very usefull : nb of times a subroutine is executed, time spent per sub, memory usage, Before rewriting a perl program into C better knowing where the time is wasted and

RE: RE : SQL Syntax quickie

2003-10-27 Thread EUROSPACE SZARINDAR
Hi Dan, To be sure to collect something, you could use the "nvl(VALUE_ORI, replacement_value_if_VALUE_ORI_is_null)" function which will return something if the entry value is null otherwise return the entry value. select nvl( max(id), 0 ) from table_id ; The "nvl" is an Oracle function but sur

RE: lowercase

2003-10-20 Thread EUROSPACE SZARINDAR
Hola Andrés, You can also use the "tr" command $stri =~ tr/A-Z/a-z/ The "tr" command also returns the number of transliteration (like s///) $stri = "Joana Prado"; if (my $tr_modif = ($stri =~ tr/A-Z/a-z/)) { print "number of modification = $tr_modif\n"; } else { print "nothing

RE: owner's name of a file

2003-10-01 Thread EUROSPACE SZARINDAR
Hi Josimar, Have a look at perldoc -f stat and getpwuid. You should afterwards transform the $uid into the literal name of the user using /etc/passwd. try : $Uid = (stat('c:\Config.sys'))[4]; $UserName = ( getpwuid( $Uid ))[0]; Michel -Message d'origine- De: Josimar Nunes de Olive

RE: list-parsing problem

2003-09-19 Thread EUROSPACE SZARINDAR
Hi, Be careful with the "sort keys %unique" because if the list is bigger like that : __DATA__ 1 a 2 b 2 c 3 a 4 d 4 d 4 e 4 f 5 g 8 f 10 e 10 y you will get : 1 a 10 e,y <== I don't think you are looking for that

RE: list-parsing problem

2003-09-19 Thread EUROSPACE SZARINDAR
Hi Marcus Just look at the perldoc perlreftut. What you are looking for is the exact exemple of the paper. Michel -Message d'origine- De: Marcus Claesson [mailto:[EMAIL PROTECTED] Date: jeudi 18 septembre 2003 11:26 À: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Objet: li

RE: reverse range (10..1)

2003-08-27 Thread EUROSPACE SZARINDAR
Hi, @normal = (0,1,2,3,4,5,6,7,8,9); foreach (0..$#normal) { unshift @reverse, (shift @normal) }; this also works fine. Michel -Message d'origine- De: Paul Archer [mailto:[EMAIL PROTECTED] Date: mardi 26 août 2003 21:45 À: [EMAIL PROTECTED] Objet: reverse range (10..1) Is there any

RE: Regular expression help

2003-08-19 Thread EUROSPACE SZARINDAR
to:[EMAIL PROTECTED] Date: lundi 18 août 2003 17:34 À: [EMAIL PROTECTED] Objet: Re: Regular expression help > >"Eurospace Szarindar" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] > >Thanks you, it works fine. Could you explain me why have you added the

RE: Regular expression help

2003-08-18 Thread EUROSPACE SZARINDAR
Thanks you, it works fine. Could you explain me why have you added the \1 ? I will have a look at Text::CSV Michel -Message d'origine- De: Rob Anderson [mailto:[EMAIL PROTECTED] Date: lundi 18 août 2003 16:39 À: [EMAIL PROTECTED] Objet: Re: Regular expression help "

Regular expression help

2003-08-18 Thread EUROSPACE SZARINDAR
Hi, I tried to write a script to extrat data from the given DATA but I can find the right regular expression to do that. RULE: I need to catch everything between quotes (single or double) and if inside exists a repeated quote (single or double) it is not seen as end of the match. #!/usr/bin/perl

RE: Last value in a array?

2003-08-14 Thread EUROSPACE SZARINDAR
Hi, You can use my $LastValue = $ARRAY[ $#ARRAY-1 ]; The pop function suppress the last value of the ARRAY. Michel -Message d'origine- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Date: vendredi 8 août 2003 12:57 À: [EMAIL PROTECTED] Objet: Last value in a array? Hi, I have a c

RE: array of regular expressions on a string

2003-08-14 Thread EUROSPACE SZARINDAR
Hi, Why don't you do like that : @array = ( '^to: myprog', '^from: [EMAIL PROTECTED]' ); $STRING = read_mail_header(...); foreach (@array) { if($STRING=~ /$_/mi ) { # This should work # FOUND . } } or

RE: regular expresion question.

2003-08-14 Thread EUROSPACE SZARINDAR
you also could try this while () { my $FilePath = (split)[5]; print "\$FilePath = $FilePath \n"; } __DATA__ 30 23 * * * /usr/lbin/sa/sa1 600 6 Michel -Message d'origine- De: Jas Grewal (DHL UK) [mailto:[EMAIL PROTECTED] Date: mercredi 13 août 2003 15:29 À: [EMAIL PROTECTE

RE: document creation.

2003-08-11 Thread EUROSPACE SZARINDAR
Hi, Why don't using the pdf format ? It is the portable document format so can be wiewed either on Unix or windows side. It is easy to create, it can be compressed (more than a world format), it cannot be modified and has much more advantages. Michel -Message d'origine- De: Chris K

RE: perl/Tk

2003-07-31 Thread EUROSPACE SZARINDAR
Hi Frank, You should install it using the given install scripts, not doing it by hand. Like other perl modules you should do: perl Makefile.PL ; make ; make test; make install Afterwards, everything will be copied at the right place and correctly declared. Michel -Message d'origine-

RE: :HList

2003-07-22 Thread EUROSPACE SZARINDAR
Hi Marcos, What you can do is to go to the perl/bin directory where you have installed Tk and you will find a executable "widget" which show you the possibilities of Tk, the code, the result. It is a very good demo clear and usable to extract code. Michel -Message d'origine

RE: Help needed on XML Files

2003-06-24 Thread EUROSPACE SZARINDAR
Hello, There are a lot of perl modules dealing with the XML. The most common is XML::Parser which will surely do whatever you want and perhaps a litle more. XML::Simple is also very useful for Simple XML treatment. Just go to CPAN web site. Michel -Message d'origine- De: Remo, Sherwi