perl module & vars

V

vertigo

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
 
G

Gunnar Hjalmarsson

vertigo said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,745
Messages
2,569,485
Members
44,909
Latest member
DestinyKetoScam

Latest Threads

Top