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.
Thanks for the input feherke.
That may be the case, but i will have to check on that. I can't post the entire code here as the file references (includes) many library files..
--------------------------------------------------------------------------
I never set a goal because u never know...
Hi,
I was studying a code which has following tag in header
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
and the right click on that page was dsiabled. I wanted to enable it. After trying for some time i commented the above line and the right starts working. Can anyone...
Perfect,Thanks..
--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
Hi All,
I have a file of following format.
2008/09/02 00:30:10 INFO> Feature.pm:181 - Processing Response for 01234 Feature FEAT_10 status A msg
2008/09/02 00:30:10 DEBUG> Feature.pm:182 - Feat Seq 582269
2008/09/02 00:30:11 INFO> Feature.pm:191 - Response FEAT_ERR_005
--
2008/09/02 00:30:11...
Yes,
The \Q tells Regex engine to treat the special characters ([ and ] in this case) as regular characters and \E tells to stop treating it.
So [ and ] are treated as regualr charactes instead of character class declaration in regex...
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.