PerlElvir
Technical User
- Aug 23, 2005
- 68
Hi Idont know how to eplain this, so than throught example and I hope that someone can help me so I have
my @ace_param6 = ("LYON LONDON PARIS<");
my @ace_param7 = ("le 23 avr. 2006 : 398,00 @0@20060423@X@0@32823@@le 30 avr. 2006 : 354,00 @1@20060430@X@0@32823@@le 07 mai 2006 : 328,00 @2@20060507@X@0@32823@@--HERE--L_1= 16 avr. 2006 : 418,00 @27@20060416@X@0@32823@@le 23 avr. 2006 : 388,00 @28@20060423@X@0@32823@@le 30 avr. 2006 : 344,00 @29@20060430@X@0@32823@@--HERE--L_2= 08 avr. 2006 : 299,00 au lieu de 398,00 @55@20060408@F@1@32824@@le 09 avr. 2006 : 299,00 au lieu de 398,00 @56@20060409@F@1@32824@@le 16 avr. 2006 : 428,00 @57@20060416@F@1@32824@@");
So I want to slpit @ace_param6 with to get
@ace_param6=("LYON","LONDON","PARIS")
and split @ace_param7 with --HERE-- to get
@ace_param6=("le 23 avr. 2006 : 398,00 @0@20060423@X@0@32823@@le 30 avr. 2006 : 354,00 @1@20060430@X@0@32823@@le 07 mai 2006 : 328,00 @2@20060507@X@0@32823@@","L_1= 16 avr. 2006 : 418,00 @27@20060416@X@0@32823@@le 23 avr. 2006 : 388,00 @28@20060423@X@0@32823@@le 30 avr. 2006 : 344,00 @29@20060430@X@0@32823@@","L_2= 08 avr. 2006 : 299,00 au lieu de 398,00 @55@20060408@F@1@32824@@")
SO now I have 3 elements each array and I want to get
for (my $i = 0; $i <= $#ville_arr; $i++)
{
$first=@ace_param6[$i]-@ace_param7[$i];
}
but in @ace_param7 I want to extract and convert to new dates also for price, but let do now just dates, so 23 avr. 2006 I want to be like 2006-4-23 and all other dates, at the end I have to get
LYON-2006-4-23
LYON-2006-4-30
LYON-2006-5-07
LONDON-2006-4-16
LONDON-2006-4-23
LONDON-2006-4-30
PARIS-2006-4-08
I hope that some can help. This forum help me a lot of time and I hope also now will be same answer
my @ace_param6 = ("LYON LONDON PARIS<");
my @ace_param7 = ("le 23 avr. 2006 : 398,00 @0@20060423@X@0@32823@@le 30 avr. 2006 : 354,00 @1@20060430@X@0@32823@@le 07 mai 2006 : 328,00 @2@20060507@X@0@32823@@--HERE--L_1= 16 avr. 2006 : 418,00 @27@20060416@X@0@32823@@le 23 avr. 2006 : 388,00 @28@20060423@X@0@32823@@le 30 avr. 2006 : 344,00 @29@20060430@X@0@32823@@--HERE--L_2= 08 avr. 2006 : 299,00 au lieu de 398,00 @55@20060408@F@1@32824@@le 09 avr. 2006 : 299,00 au lieu de 398,00 @56@20060409@F@1@32824@@le 16 avr. 2006 : 428,00 @57@20060416@F@1@32824@@");
So I want to slpit @ace_param6 with to get
@ace_param6=("LYON","LONDON","PARIS")
and split @ace_param7 with --HERE-- to get
@ace_param6=("le 23 avr. 2006 : 398,00 @0@20060423@X@0@32823@@le 30 avr. 2006 : 354,00 @1@20060430@X@0@32823@@le 07 mai 2006 : 328,00 @2@20060507@X@0@32823@@","L_1= 16 avr. 2006 : 418,00 @27@20060416@X@0@32823@@le 23 avr. 2006 : 388,00 @28@20060423@X@0@32823@@le 30 avr. 2006 : 344,00 @29@20060430@X@0@32823@@","L_2= 08 avr. 2006 : 299,00 au lieu de 398,00 @55@20060408@F@1@32824@@")
SO now I have 3 elements each array and I want to get
for (my $i = 0; $i <= $#ville_arr; $i++)
{
$first=@ace_param6[$i]-@ace_param7[$i];
}
but in @ace_param7 I want to extract and convert to new dates also for price, but let do now just dates, so 23 avr. 2006 I want to be like 2006-4-23 and all other dates, at the end I have to get
LYON-2006-4-23
LYON-2006-4-30
LYON-2006-5-07
LONDON-2006-4-16
LONDON-2006-4-23
LONDON-2006-4-30
PARIS-2006-4-08
I hope that some can help. This forum help me a lot of time and I hope also now will be same answer