Checking if socket is open with an array

Discussion in 'Perl' started by Joel Ross, Nov 8, 2009.

  1. Joel Ross

    Joel Ross Guest

    Hi all,

    I'm having some trouble with an array. I'm try to check if a service is
    running by getting the values from an array. I have uploaded the code to
    http://pastebin.com/

    Code : test.pl
    http://pastebin.com/m19bcecb

    Code testsettings.pm
    http://pastebin.com/m393894dc

    It all works well if I have all the code in one file (provided here:
    http://pastebin.com/m1d44408f), but when I provide the array in a
    separate file it seems to not work. It does gets the values from the
    array because their printed to the screen. I just don't understand why
    it doesn't use those values to make the connection.

    I need to have the array in a separate file to act like a properties file.

    I'm running Perl v5.10.0 and running it on FC11. Any help appreciated.

    Cheers

    jrosco
     
    Joel Ross, Nov 8, 2009
    #1
    1. Advertisements

  2. Joel Ross

    Dan Rumney Guest

    Can you run the program and provide us with the output that you're seeing?

    Dan

    Joel Ross wrote:
    > Hi all,
    >
    > I'm having some trouble with an array. I'm try to check if a service is
    > running by getting the values from an array. I have uploaded the code to
    > http://pastebin.com/
    >
    > Code : test.pl
    > http://pastebin.com/m19bcecb
    >
    > Code testsettings.pm
    > http://pastebin.com/m393894dc
    >
    > It all works well if I have all the code in one file (provided here:
    > http://pastebin.com/m1d44408f), but when I provide the array in a
    > separate file it seems to not work. It does gets the values from the
    > array because their printed to the screen. I just don't understand why
    > it doesn't use those values to make the connection.
    >
    > I need to have the array in a separate file to act like a properties file.
    >
    > I'm running Perl v5.10.0 and running it on FC11. Any help appreciated.
    >
    > Cheers
    >
    > jrosco
     
    Dan Rumney, Nov 12, 2009
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Avizz
    Replies:
    3
    Views:
    15,059
    Andy Fish
    Sep 29, 2003
  2. Berlin  Brown
    Replies:
    3
    Views:
    1,365
    Berlin Brown
    Jul 1, 2005
  3. Markus Pitha

    Checking if socket is still open?

    Markus Pitha, May 2, 2005, in forum: C Programming
    Replies:
    2
    Views:
    1,122
    Mark McIntyre
    May 2, 2005
  4. Laszlo Nagy
    Replies:
    1
    Views:
    7,615
    Mark Wooding
    Jan 27, 2009
  5. Steve Holden
    Replies:
    1
    Views:
    1,061
  6. Kr Alfabeta
    Replies:
    13
    Views:
    925
    Slan Dizier
    May 8, 2008
  7. Clemens Wyss
    Replies:
    3
    Views:
    926
    Sandor Szücs
    May 18, 2009
  8. Jakob Lell
    Replies:
    0
    Views:
    662
    Jakob Lell
    Apr 15, 2004
Loading...