Hi,
what output does the print $file statement give?
--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
Have you tried printing $file inside the loop?
--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
Try this
use XML::Twig;
my $xml_dir = 'C:\xmlperl';
my $cnt = 0;
my $out;
opendir(DIR,$xml_dir) || die;
my @TranscriptsList = grep(/xml$/, readdir(DIR));
closedir(DIR);
foreach $file (@TranscriptsList) {
my $twig= new XML::Twig(TwigRoots => {Texte => 1});
$file =...
Hi,
Try printing the value of $file. What is the value it is storing. I guess its only the file name and not the dir. Try prepending the dir to $fil and see.
--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen...
Hi,
If I have understood your post correctly, why not create output file dynamically and write to it. Something like
my $cnt = 0;
my $out;
foreach $file (@TranscriptsList) {
my $twig= new XML::Twig(TwigRoots => {Texte => 1});
$twig->parsefile($file);
$twig->print;
$out =...
Hi jpadie,
The above code is working for me as well. :)
Just trying to know more about the local time conversion. I will get back with some more queries :)
Thanks for your help.
--------------------------------------------------------------------------
I never set a goal because u never know...
Hi Tarianna,
I beleive database hit is the easiest and convinient way (unfortunately).
or you can track which pages user has visited using sessions and use javascript (history) to go back to those pages.
--------------------------------------------------------------------------
I never set a...
Hi jpadie,
<?php
echo getCET('18:00', 'EUROPE/Berlin');
function getCET($time, $timeZone){
date_default_timezone_set('EUROPE/Berlin');
return date('H:i:s O', strtotime("$time $timeZone"));
}
?>
for the above code, the output should be 18:00:00 as both the timezones are equal...
Thanks jpadie.
Is it server admin's responsibility to see if the rules are propagated properly. Can this be checked somehow that this is fine.
--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
Thanks japadie.
Below is my test code
<?php
date_default_timezone_set('EUROPE/Vienna');
$time = "18:00 CET";
$localtime = date('H:i:s T', strtotime($time));
echo $localtime;
?>
and the output is 19:00:00 CEST. So it is working.
The task has changed though somewhat :)
I have a script which...
Hi,
I have a task to convert CET time (e.g.18:00 CET) to local time depending on the timezone provided(e.g.Europe/Vienna, US/Eastern etc). The conversion should also take into consideration the day light saving.
The input will be hh:mm e.g.18:00 and the ouput should be in the similar format. I...
Hi,
I have a database name having a '-' character in it. I am using mysql V 5.1 on Windows and I am unable to drop the database. Any suggestions on how to drop DB..
--------------------------------------------------------------------------
I never set a goal because u never know whats going...
Thanks will try that out!!
--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.