Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Expat.pm and Parser.pm errors

by brap (Pilgrim)
on Oct 17, 2012 at 12:25 UTC ( #999537=note: print w/ replies, xml ) Need Help??


in reply to Expat.pm and Parser.pm errors

Hi jpinones,

Not to detract from runrig's debugging advice, but I wonder if you've checked the value of $cb_ticker right before the $parser->parse($cb_ticker); call? Just a hunch, but I have a feeling it might not contain what it should.


Comment on Re: Expat.pm and Parser.pm errors
Select or Download Code
Re^2: Expat.pm and Parser.pm errors
by jpinones (Initiate) on Oct 17, 2012 at 17:54 UTC
    I tried to do that with a single print but does not work either. How can I check the containing stuff?

      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)?

        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$
        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: []
        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);

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2014-09-16 11:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (13 votes), past polls