Loading ...
Sorry, an error occurred while loading the content.
 

Re: [PBML] Warning messages

Expand Messages
  • Thiago Nascimento
    ... For example: my $oper1; # not initialized my $oper2 = 10; print blah n if $oper1 $oper2; # using $oper1 without a value ... For
    Message 1 of 11 , May 10, 2007
      >> Use of uninitialized value in numeric gt (>)

      For example:
      <code>
      my $oper1; # not initialized
      my $oper2 = 10;
      print "blah\n" if $oper1 > $oper2; # using $oper1 without a value
      <\code>

      >> Use of uninitialized value in concatenation (.) or string
      For example:
      <code>
      my $str1; # not initialized
      my $str2 = "Perl";
      print $str1 . $str2; # using $str1 without a value
      <\code>

      HTH.

      On 5/10/07, Mirza Abdullah Jan <jan576pk@...> wrote:
      >
      > Hi All,
      >
      > Why these warning messages appears, what is the reason? How we can cater
      > this?
      >
      > Use of uninitialized value in numeric gt (>)
      >
      > Use of uninitialized value in concatenation (.) or string
      >
      > Regards
      > Abdullah
      >
      > ---------------------------------
      > Ahhh...imagining that irresistible "new car" smell?
      > Check outnew cars at Yahoo! Autos.
      >
      > [Non-text portions of this message have been removed]
      >
      >
      >



      --
      Thiago Nascimento
      perl -e '$_="tMM naaCt Feocmama_itpUilucoGa";$_.=$1,print $2 while
      s/(..)(.)//;print substr$_,1,1;'
      "...just because I don't know the meaning of my art, does not mean it has no
      meaning..." S.D.


      [Non-text portions of this message have been removed]
    • merlyn@stonehenge.com
      ... Mirza Why these warning messages appears, what is the reason? How we can cater this? Mirza Use of uninitialized value in numeric gt ( ) My guess is that
      Message 2 of 11 , May 10, 2007
        >>>>> "Mirza" == Mirza Abdullah Jan <jan576pk@...> writes:

        Mirza> Why these warning messages appears, what is the reason? How we can cater this?

        Mirza> Use of uninitialized value in numeric gt (>)

        My guess is that you have undef on one side or another of >.

        Mirza> Use of uninitialized value in concatenation (.) or string

        Again, just guessing, but I bet you have undef on one side or another
        of a concatenation, or an interpolation "foo $x bar".

        You'll need to show a minimal code snippet that demonstrates these errors to
        get more help.

        --
        Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
        <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
        Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
        See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
      • jiqiang yao
        Hi, I want to write a subroutine for openfile (see below). However, the subroutine failed to be returned to $fhandle. Can anybody tells me why? yao ...
        Message 3 of 11 , May 10, 2007
          Hi,

          I want to write a subroutine for openfile (see below).
          However, the subroutine failed to be returned to
          $fhandle. Can anybody tells me why?

          yao


          ----------------------------------------------
          $fhandle = openfile("test.txt");

          sub openfile{
          $fname = $_[0];
          open(filehandler, $fname) || die "Couldn't open the
          file.\n";

          return (\*filehandler);
          }
          -----------------------------------------------



          ____________________________________________________________________________________
          We won't tell. Get more on shows you hate to love
          (and love to hate): Yahoo! TV's Guilty Pleasures list.
          http://tv.yahoo.com/collections/265
        • merlyn@stonehenge.com
          ... jiqiang I want to write a subroutine for openfile (see below). jiqiang However, the subroutine failed to be returned to jiqiang $fhandle. Can anybody
          Message 4 of 11 , May 10, 2007
            >>>>> "jiqiang" == jiqiang yao <jiqiang123@...> writes:

            jiqiang> I want to write a subroutine for openfile (see below).
            jiqiang> However, the subroutine failed to be returned to
            jiqiang> $fhandle. Can anybody tells me why?

            Yes, stop using package-based filehandles. Use lexical filehandles.

            sub openfile {
            open my $handle, "<", shift or die "Cannot open: $!";
            return $handle;
            }

            But if it's this short, I wouldn't even write a subroutine.

            --
            Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
            <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
            Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
            See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
          • jiqiang yao
            Thank you very much. Can you write a similar one to open a directory? ...
            Message 5 of 11 , May 14, 2007
              Thank you very much.

              Can you write a similar one to open a directory?

              --- merlyn@... wrote:

              > >>>>> "jiqiang" == jiqiang yao
              > <jiqiang123@...> writes:
              >
              > jiqiang> I want to write a subroutine for openfile
              > (see below).
              > jiqiang> However, the subroutine failed to be
              > returned to
              > jiqiang> $fhandle. Can anybody tells me why?
              >
              > Yes, stop using package-based filehandles. Use
              > lexical filehandles.
              >
              > sub openfile {
              > open my $handle, "<", shift or die "Cannot open:
              > $!";
              > return $handle;
              > }
              >
              > But if it's this short, I wouldn't even write a
              > subroutine.
              >
              > --
              > Randal L. Schwartz - Stonehenge Consulting Services,
              > Inc. - +1 503 777 0095
              > <merlyn@...>
              > <URL:http://www.stonehenge.com/merlyn/>
              > Perl/Unix/security consulting, Technical writing,
              > Comedy, etc. etc.
              > See PerlTraining.Stonehenge.com for onsite and
              > open-enrollment Perl training!
              >




              ____________________________________________________________________________________Yahoo! oneSearch: Finally, mobile search
              that gives answers, not web links.
              http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
            • Rob Biedenharn
              That s an odd way to phrase a request for Randall s consulting rates? Perhaps you could try perldoc -f opendir before you decide whether you really want to
              Message 6 of 11 , May 14, 2007
                That's an odd way to phrase a request for Randall's consulting
                rates? Perhaps you could try
                perldoc -f opendir
                before you decide whether you really want to hire a consultant.

                -Rob

                On May 14, 2007, at 12:28 PM, jiqiang yao wrote:

                > Thank you very much.
                >
                > Can you write a similar one to open a directory?
                >
                > --- merlyn@... wrote:
                >
                >>>>>>> "jiqiang" == jiqiang yao
                >> <jiqiang123@...> writes:
                >>
                >> jiqiang> I want to write a subroutine for openfile
                >> (see below).
                >> jiqiang> However, the subroutine failed to be
                >> returned to
                >> jiqiang> $fhandle. Can anybody tells me why?
                >>
                >> Yes, stop using package-based filehandles. Use
                >> lexical filehandles.
                >>
                >> sub openfile {
                >> open my $handle, "<", shift or die "Cannot open:
                >> $!";
                >> return $handle;
                >> }
                >>
                >> But if it's this short, I wouldn't even write a
                >> subroutine.
                >>
                >> --
                >> Randal L. Schwartz - Stonehenge Consulting Services,
                >> Inc. - +1 503 777 0095
                >> <merlyn@...>
                >> <URL:http://www.stonehenge.com/merlyn/>
                >> Perl/Unix/security consulting, Technical writing,
                >> Comedy, etc. etc.
                >> See PerlTraining.Stonehenge.com for onsite and
                >> open-enrollment Perl training!
                >>

                Rob Biedenharn http://agileconsultingllc.com
                Rob@...
              • merlyn@stonehenge.com
                ... jiqiang Can you write a similar one to open a directory? Yes. I can. What s your budget? ... -- Randal L. Schwartz - Stonehenge Consulting Services,
                Message 7 of 11 , May 14, 2007
                  >>>>> "jiqiang" == jiqiang yao <jiqiang123@...> writes:

                  jiqiang> Can you write a similar one to open a directory?

                  Yes. I can. What's your budget?

                  :-)

                  --
                  Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
                  <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
                  Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
                  See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
                • jiqiang yao
                  Hi, How to save the contents as html file given an internet address? ____________________________________________________________________________________Be a
                  Message 8 of 11 , May 14, 2007
                    Hi,
                    How to save the contents as html file given an
                    internet address?



                    ____________________________________________________________________________________Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.
                    http://answers.yahoo.com/dir/?link=list&sid=396545469
                  • jiqiang yao
                    Thank you, Rob. I have written a subroutine which can extract all the files within this folder and this is exactly what I need. ...
                    Message 9 of 11 , May 14, 2007
                      Thank you, Rob.
                      I have written a subroutine which can extract all the
                      files within this folder and this is exactly what I
                      need.

                      --- Rob Biedenharn <Rob@...> wrote:

                      > That's an odd way to phrase a request for Randall's
                      > consulting
                      > rates? Perhaps you could try
                      > perldoc -f opendir
                      > before you decide whether you really want to hire a
                      > consultant.
                      >
                      > -Rob
                      >
                      > On May 14, 2007, at 12:28 PM, jiqiang yao wrote:
                      >
                      > > Thank you very much.
                      > >
                      > > Can you write a similar one to open a directory?
                      > >
                      > > --- merlyn@... wrote:
                      > >
                      > >>>>>>> "jiqiang" == jiqiang yao
                      > >> <jiqiang123@...> writes:
                      > >>
                      > >> jiqiang> I want to write a subroutine for
                      > openfile
                      > >> (see below).
                      > >> jiqiang> However, the subroutine failed to be
                      > >> returned to
                      > >> jiqiang> $fhandle. Can anybody tells me why?
                      > >>
                      > >> Yes, stop using package-based filehandles. Use
                      > >> lexical filehandles.
                      > >>
                      > >> sub openfile {
                      > >> open my $handle, "<", shift or die "Cannot
                      > open:
                      > >> $!";
                      > >> return $handle;
                      > >> }
                      > >>
                      > >> But if it's this short, I wouldn't even write a
                      > >> subroutine.
                      > >>
                      > >> --
                      > >> Randal L. Schwartz - Stonehenge Consulting
                      > Services,
                      > >> Inc. - +1 503 777 0095
                      > >> <merlyn@...>
                      > >> <URL:http://www.stonehenge.com/merlyn/>
                      > >> Perl/Unix/security consulting, Technical writing,
                      > >> Comedy, etc. etc.
                      > >> See PerlTraining.Stonehenge.com for onsite and
                      > >> open-enrollment Perl training!
                      > >>
                      >
                      > Rob Biedenharn http://agileconsultingllc.com
                      > Rob@...
                      >
                      >
                      >




                      ____________________________________________________________________________________
                      It's here! Your new message!
                      Get new email alerts with the free Yahoo! Toolbar.
                      http://tools.search.yahoo.com/toolbar/features/mail/
                    • Damien Carbery
                      ... use LWP::Simple; my $status = getstore( http://www.yahoo.com , yahoo-home.html ); print File downloaded. if is_success($status);
                      Message 10 of 11 , May 15, 2007
                        --- In perl-beginner@yahoogroups.com, jiqiang yao <jiqiang123@...> wrote:
                        >
                        > Hi,
                        > How to save the contents as html file given an
                        > internet address?
                        >

                        use LWP::Simple;
                        my $status = getstore( 'http://www.yahoo.com', 'yahoo-home.html' );
                        print "File downloaded." if is_success($status);
                      Your message has been successfully submitted and would be delivered to recipients shortly.