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

Re: Uninitialized value -

Expand Messages
  • daymobrew
    ... problem ... blank, I ... 345. ... to find ... then ... nothing ... How about: if ( defined $InterfaceIndex ) { ...
    Message 1 of 3 , May 2, 2002
    • 0 Attachment
      --- In perl-beginner@y..., "Chirhart, Brian" <bchirhart@f...> wrote:
      > I am trying to evaluate a variable that is sometimes blank. The
      > that I am running in to is that when it evaluates the variable as
      blank, I
      > get an error of "Use of uninitialized value in string ne at line
      > Here is 345:
      > if ($InterfaceIndex ne '' ) {
      > $NewInterfaceIndex = $InterfaceIndex;
      > }
      > This must be something that I am just overlooking, but I can't seem
      to find
      > why it would error out then.
      > What I am trying to do is say - if $InterfaceIndex equals anything,
      > pass that value to the variable $NewInterfaceIndex. If it equals
      > then do nothing.

      How about:
      if ( defined $InterfaceIndex ) { ...
    • Eric Via
      I d welcome the views on this issue from you fine people, especially the more seasoned Perl folks among us. I have a friend at work who *I* turned on to Perl -
      Message 2 of 3 , May 2, 2002
      • 0 Attachment
        I'd welcome the views on this issue from you fine people, especially the
        more seasoned Perl folks among us.

        I have a friend at work who *I* turned on to Perl - he is a C++ Developer,
        and so it was very cool to have HIM looking over MY shoulder amazed at some
        stuff I had done with Perl. (I'm no whiz - just persistant and a (usually
        good) resercher.

        He learned it - we learned it together - I still love Perl and am still

        Suddenly he's been bitten by the JAVA BUG!!! He thinks I should "move to
        learning Java, move to learning Java!" he tells me 20 times a day - he tells
        me today that "any more time you spend developing in Perl is a waste of your
        time!" And yesterday he "gave" me a huge book of learning Java!

        He says now that "very few" companies use Perl that much - and that Java is
        the way to go - that it will provide me with "more structure" than Perl can
        offer and I can learn about "Objects"

        (I almost picked up the nearest OBJECT from my desk and threw it at him at
        that stage)

        I'm NOT trying to start a "which is better and why" long thread - simply
        soliciting a few opinions on:

        * Do you think that before I am CONFIDENT with MOST of using Perl on the fly
        without reference I should "move on" to another language?

        * Do you feel Perl is "on the way out" or going to be overlooked by Java??!
        (Maybe it's my computer - but I personally have found that ANY time I hit a
        page with Java onboard or run a Java app such as Limewire I feel my computer
        is about to explode - that it's doing an AWFUL lot of NOISE and disk
        spinning for no apparent reason - it gives me the creeps the way it acts!)

        I tend to think - to HOPE - that as far as carreers go, that most any
        company would have Perl AVAILABLE, and I don't know about all companies, but
        the current company i work for - I joined up and was surrounded by COBOl
        programmers (Microfocus COBOl on an HP Unix box) , and I showed them how to
        use UNIX for shell scripts, etc - and some of them are quite fond of UNIX
        now - in other words I like to think it's not WHICH tool you USE, but how
        you get it done with the least amount of time and effort wasted.

        So this is a true beginner's question and subject, I am simply worried
        about the time I have invested into learning Perl and solicit opinions pro
        or con.



        Eric Via coolhand.luke@...
        Home: http://home1.gte.net/res0qgcc/ericpage.html
        The worst thing about censorship is *****************.

        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.