> -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
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
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
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
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:
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
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
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
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
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
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
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
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
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
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
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
"
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
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
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
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
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
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-
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
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
24 matches
Mail list logo