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 Mike Lewis 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: *

  • Users: GZPM
  • Order by date
  1. GZPM

    Parsing XML with XML::Twig help

    Hi, Please see below code snippet and advise on what I may be doing wrong. Trying to print only once instance of EAN or ISBN per record. Each xml record lists one or multiple ISBN or EAN identifiers, but I want my output to list (in this order) the first found EAN, and if no EAN exists the...
  2. GZPM

    re-arranging flat file into pipe-delimited

    It worked like a charm! Thank you both for your assistance on this thread. Hashes were never my strong suit, and this piece of code is sending me back to the reference books so as to brush up on them and add appropriate notes next to each code line for future reference. Here's a strange thing...
  3. GZPM

    re-arranging flat file into pipe-delimited

    Hi Kevin, Yes, I am stuck! I tried your code (below) and saw the results, but not sure how to re-arrange what I see into what I need. Any guidance would be appreciated! use Data::Dumper; my %HoA = (); while(<FILE>){ if (/^<(\w+)>(.*)$/) { push @{$HoA{$1}},$2; } } print Dumper \%HoA...
  4. GZPM

    re-arranging flat file into pipe-delimited

    Thank you! I'm going to give it a try and post back with results and/or additional questions.
  5. GZPM

    re-arranging flat file into pipe-delimited

    I've tried every which way (newbie here), but can't seem to come up with a good solution. here's an example of the raw data: <tag1>01234567890 <tag2>apple <tag3>juice <end> <tag1>12345678901 <tag2>orange <tag3>juice <tag4>ACT <end> Here's the desired (pipe-delimited) output needed...
  6. GZPM

    retrieve portions of XML data via perl and output to text file

    I came up with this code, but it only gives me the first product record. How would i edit it to get all of the records? #!usr/bin/perl use strict; use XML::Simple; our $file = 'test_file.xml'; our $xml = XML::Simple->new(); our $data = $xml->XMLin($file); foreach my...
  7. GZPM

    retrieve portions of XML data via perl and output to text file

    ok...i'm officially lost.
  8. GZPM

    retrieve portions of XML data via perl and output to text file

    I am reading through and trying out the perl forum post right before mine and will post back my results (if any). In the meantime, please send whatever suggestions you may have. thx
  9. GZPM

    retrieve portions of XML data via perl and output to text file

    Hi there, I'm new to XML and having a hard time with below. here is my original XML data: <productidentifier> <b221>02</b221> <b244>0123456789</b244> </productidentifier> <productidentifier> <b221>03</b221> <b244>9780123456789</b244> </productidentifier> <othertext> <d102>02</d102>...
  10. GZPM

    anyone familiar with cronw? I can't my cronjob to run

    travs69 you hit it on the nose! I moved my perl script from where it was originally (folder name with spaces) onto the main C drive. That did it. Thanks for the help everyone!
  11. GZPM

    anyone familiar with cronw? I can't my cronjob to run

    I tried various times since last night, I even now have it down to every two minutes...nada. */2 * * * * C:\Perl\bin\perl.exe C:\Documents and Settings\Me\My Documents\create_ftp_output.plx does the crontab.txt file need to be in a different path? it's currently in the original path where it...
  12. GZPM

    anyone familiar with cronw? I can't my cronjob to run

    thanks for catching that Mike042. I went back and edited the crontab.txt file to : 2 * * * * C:\Perl\bin\perl.exe C:\Documents and Settings\Me\My Documents\create_ftp_output.plx and still waiting for some kind of output.
  13. GZPM

    anyone familiar with cronw? I can't my cronjob to run

    I'm on W-xp, so I installed cronw service last night. This is my first time dealing with crons. I already read the FAQ on this site, but everything is geared towards unix. the intended perl script to be run via cronjob works fine when I run it directly, so I know that's not where the problem...
  14. GZPM

    get sum total of strings

    Thanks garybroadwater, it worked like a charm!
  15. GZPM

    get sum total of strings

    I need help figuring out how to incorporate/get sum total of strings, while inside a foreach block. any help will be appreciated. Here's the code: _________________________________________ #!usr/bin/perl use strict; use File::stat; our $dir_path = 'C:\path_name'; open DIR, $dir_path or die...
  16. GZPM

    Adding file size and modified date

    here's an example of what i get: file_name|size|mdtm CDC_02172006_onix21.xml - 1284696 - 1140294143 and here's what I see for above file in the FTP server CDC_02172006_onix21.xml - 1,212KB - 2/18/2006 3:22 PM As you can see, even though there is a date in the file name, it is usually...
  17. GZPM

    Adding file size and modified date

    Hi rharsh, thx for the info. It worked, except now I get the size/mdtm in binary (i think?). Is there a way to convert them to size to KB and mdtm to m/d/yyyy h:mm AM/PM? GZPM I have already read the cpan page, but the syntax is what gets me in trouble.
  18. GZPM

    Adding file size and modified date

    This is my first post, and after looking through various threads I still can't find a solution to below. A little help would be GREATLY appreciated. Below script works swell, but now i've also been asked to include file size and modified date. I've tried a few i found on various threads, but...

Part and Inventory Search

Back
Top