Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: strict and require.

by uwevoelker (Pilgrim)
on Jan 03, 2002 at 13:51 UTC ( [id://135952]=note: print w/replies, xml ) Need Help??


in reply to strict and require.

This works (tested):
#!/usr/bin/perl -w use strict; use vars qw($data); require "load_configfile_data.pl"; print $data;
... and in load_configfile_data.pl this:
$data = "Test erfolgreich."; 1;
Good bye, Uwe

Replies are listed 'Best First'.
Re: Re: strict and require.
by Baz (Friar) on Jan 03, 2002 at 20:45 UTC
    Ok Guys, Success, and i wrote my first module in the process. Altough i did have to add the line
    use lib '.';
    even though i presumed the . directory was always stored in @INC
    Anyway THanks.
      Yes it is. But as the last entry in the lib array. Maybe there was another file with the same name in your @INC path.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://135952]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-26 02:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found