Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Expat.pm and Parser.pm errors

by brap (Pilgrim)
on Oct 17, 2012 at 18:25 UTC ( [id://999593]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Expat.pm and Parser.pm errors
in thread Expat.pm and Parser.pm errors

Hi jpinones,

Back to runrig's first reply, is the output from your original message the only output you're getting, or are other things showing up? I'd hope you're seeing the 'mkdir' and 'unzip' lines at least, in addition to the errors you provided.

Based on what's at LWP::Simple, the get() method can return undef if it fails. I'm not clear on what you mean by "does not work either" -- maybe it's not displaying anything? What if you try print "cb_ticker: [$cb_ticker]\n"; and see what shows up between the brackets?

You do appear to be displaying the value of $string1, which is what you're trying to retrieve - have you ensured that value is what you expect (I would guess you have, but can't hurt much to ask)?

Replies are listed 'Best First'.
Re^4: Expat.pm and Parser.pm errors
by jpinones (Initiate) on Oct 19, 2012 at 20:57 UTC
    Thanks all, the error Use of uninitialized value in subroutine entry at /usr/lib/perl5/XML/Parser/Expat.pm line 475. went away with:
    open(FILE, $string1) or die "Can't read file 'filename' [$!]\n +"; $cb_ticker = <FILE>; close (FILE);
Re^4: Expat.pm and Parser.pm errors
by jpinones (Initiate) on Oct 17, 2012 at 20:59 UTC

    this is my output

    jpinones@lx-jpinones:/samba/Matrix$ ./test01.pl casoPruebaEnvioCobroAu +tomatico.xlsx casoUsoEnvioCobroAutomatico.docx visionProcesoFacturac +ion.docx 1000 Subroutine hdl_start redefined at ./test01.pl line 141. Subroutine hdl_end redefined at ./test01.pl line 157. Subroutine hdl_char redefined at ./test01.pl line 162. Subroutine hdl_def redefined at ./test01.pl line 167. Subroutine format_message redefined at ./test01.pl line 169. Name "Encode::Locale::ENCODING_UTF-8" used only once: possible typo at + /usr/share/perl5/Encode/Locale.pm line 97. Use of uninitialized value in print at ./test01.pl line 189. FILE : Use of uninitialized value in print at ./test01.pl line 190. COUNT : Use of uninitialized value in numeric le (<=) at ./test01.pl line 194. Use of uninitialized value in print at ./test01.pl line 196. --------- SHEET: Use of uninitialized value in numeric le (<=) at ./test01.pl line 194. Use of uninitialized value in numeric eq (==) at ./test01.pl line 206. 1 casoUsoEnvioCobroAutomatico.docx casoUsoEnvioCobroAutomatico.docx mkdir casoUsoEnvioCobroAutomatico.docx.dir /usr/bin/unzip casoUsoEnvioCobroAutomatico.docx -d ./casoUsoEnvioCobro +Automatico.docx.dir Archive: casoUsoEnvioCobroAutomatico.docx inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/[Content_Types].xm +l inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/_rels/.rels inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/word/_rels/documen +t.xml.rels inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/word/document.xml + inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/word/_rels/footer1 +.xml.rels inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/word/_rels/header1 +.xml.rels inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/word/header2.xml inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/word/footer2.xml inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/word/_rels/header2 +.xml.rels inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/word/header1.xml inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/word/footer1.xml inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/word/_rels/footer2 +.xml.rels inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/word/endnotes.xml + inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/word/footnotes.xml + extracting: ./casoUsoEnvioCobroAutomatico.docx.dir/word/media/image3. +png inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/word/theme/theme1. +xml extracting: ./casoUsoEnvioCobroAutomatico.docx.dir/word/media/image5. +png extracting: ./casoUsoEnvioCobroAutomatico.docx.dir/word/media/image4. +png extracting: ./casoUsoEnvioCobroAutomatico.docx.dir/word/media/image1. +png extracting: ./casoUsoEnvioCobroAutomatico.docx.dir/word/media/image2. +png inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/word/_rels/setting +s.xml.rels inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/word/settings.xml + inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/word/styles.xml inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/word/webSettings.x +ml inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/word/fontTable.xml + inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/docProps/core.xml + inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/docProps/app.xml inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/word/stylesWithEff +ects.xml inflating: ./casoUsoEnvioCobroAutomatico.docx.dir/word/numbering.xml + ./casoUsoEnvioCobroAutomatico.docx.dir/word/document.xml paso cb ticker paso parser Use of uninitialized value in subroutine entry at /usr/lib/perl5/XML/P +arser/Expat.pm line 475. no element found at line 1, column 0, byte -1 at /usr/lib/perl5/XML/Pa +rser.pm line 187 jpinones@lx-jpinones:/samba/Matrix$
Re^4: Expat.pm and Parser.pm errors
by jpinones (Initiate) on Oct 17, 2012 at 21:03 UTC
    If I print the cb_sticker  print "cb_ticker: [$cb_ticker]\n"; I have:
    Use of uninitialized value $cb_ticker in concatenation (.) or string a +t ./test01.pl line 138. cb_ticker: []
      Well, obviously cb_ticker is not what it's supposed to be. Why do you suppose you got that result? Maybe get() did not return anything? Maybe you did not supply a valid URL to get()? (Hint: check the value of $string1, the input to the get function. It is not a URL). You seem to be in way over your head if you can not check the input and output to your functions. You need to do much less and make sure that step is correct before proceeding to the next step.
        I replaced "get(" by "system (cat(" to insert all the xml content to $cp_sticker but did not work...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://999593]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-24 13:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found