perl module & vars

Discussion in 'Perl' started by vertigo, Jul 6, 2004.

  1. vertigo

    vertigo Guest

    Hello
    Can i export from perl module value in variable ?
    For example:
    $default_path="/usr/bin/";
    How should i call this variable from other programs which
    use this module ?

    Thanx
    Michal
     
    vertigo, Jul 6, 2004
    #1
    1. Advertising

  2. vertigo wrote:
    > Can i export from perl module value in variable ?
    > For example:
    > $default_path="/usr/bin/";
    > How should i call this variable from other programs which
    > use this module ?


    If the variable has been imported: As usual. Otherwise you need to
    qualify the name like:

    $packagename::default_path

    Why don't you read "perldoc perlmod", and try to create a simple
    module to get a grasp.

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
     
    Gunnar Hjalmarsson, Jul 6, 2004
    #2
    1. Advertising

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. Jon

    app vars and cache vars

    Jon, Dec 14, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    419
  2. Replies:
    1
    Views:
    333
    Diez B. Roggisch
    Oct 29, 2006
  3. Linuxguy123
    Replies:
    7
    Views:
    720
    Paddy O'Loughlin
    Feb 20, 2009
  4. caccolangrifata
    Replies:
    18
    Views:
    422
    Chris Torek
    Jul 22, 2011
  5. Owen_Townsend
    Replies:
    5
    Views:
    179
    Stephan Titard
    Jul 10, 2006
Loading...

Share This Page