Re: using a library

Discussion in 'Perl Misc' started by Charlton Wilbur, Feb 28, 2014.

  1. >>>>> "MN" == Marek Novotny <> writes:

    MN> My question is this. In the above example I take an array and
    MN> convert it to a string where it is passed to the library where
    MN> the string is converted back to an array. Then I process my
    MN> answer, which is converted to a string and returned back to the
    MN> Perl script.

    MN> Can I simply pass an array without conversion to a string??

    The library expects a string of space-separated numbers, so unless you
    modify the library, you must pass in a string.

    And you can pass in an array, but you'll be safer passing it in as an
    array reference -- see perldoc perlreftut.

    Charlton



    --
    Charlton Wilbur
     
    Charlton Wilbur, Feb 28, 2014
    #1
    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. Mythran
    Replies:
    0
    Views:
    2,606
    Mythran
    Aug 24, 2004
  2. Alan Ferrandiz [MCT]
    Replies:
    0
    Views:
    544
    Alan Ferrandiz [MCT]
    Sep 11, 2004
  3. Sweep

    Library in library...

    Sweep, Dec 8, 2003, in forum: C++
    Replies:
    1
    Views:
    483
    Jack Klein
    Dec 9, 2003
  4. Replies:
    6
    Views:
    1,040
    red floyd
    May 10, 2005
  5. David Soukal

    library using library?

    David Soukal, May 14, 2004, in forum: C Programming
    Replies:
    10
    Views:
    708
    Brian Gough
    May 17, 2004
Loading...

Share This Page