Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. spookie

    Handle xml files with perl

    Hi, what output does the print $file statement give? -------------------------------------------------------------------------- I never set a goal because u never know whats going to happen tommorow.
  2. spookie

    Handle xml files with perl

    Have you tried printing $file inside the loop? -------------------------------------------------------------------------- I never set a goal because u never know whats going to happen tommorow.
  3. spookie

    Handle xml files with perl

    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 =...
  4. spookie

    Handle xml files with perl

    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...
  5. spookie

    Handle xml files with perl

    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 =...
  6. spookie

    convert into local time

    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...
  7. spookie

    Passing Data Thru Pages

    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...
  8. spookie

    convert into local time

    Hi jpadie, Still no luck.. <?php echo getCET('18:00', 'europe/berlin'); //can be any valid timezone identifier EUROPE/Paris GMT etc etc function getCET($time, $timeZone){ date_default_timezone_set('europe/berlin'); return date('H:i:s O', strtotime($time .'europe/berlin')); } ?> still...
  9. spookie

    convert into local time

    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...
  10. spookie

    convert into local time

    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.
  11. spookie

    convert into local time

    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...
  12. spookie

    convert into local time

    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...
  13. spookie

    Not able to drop database due to '-' character

    Hi ingresman , It worked.
  14. spookie

    Not able to drop database due to '-' character

    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...
  15. spookie

    meta tag disables the right click

    Thanks will try that out!! -------------------------------------------------------------------------- I never set a goal because u never know whats going to happen tommorow.
  16. spookie

    meta tag disables the right click

    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...
  17. spookie

    meta tag disables the right click

    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...
  18. spookie

    Extract only nos from multiple lines

    Perfect,Thanks.. -------------------------------------------------------------------------- I never set a goal because u never know whats going to happen tommorow.
  19. spookie

    Extract only nos from multiple lines

    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...
  20. spookie

    regex blackout

    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...

Part and Inventory Search

Back
Top