Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: lib

by alfie (Pilgrim)
on Apr 11, 2001 at 17:38 UTC ( #71651=note: print w/replies, xml ) Need Help??


in reply to lib

Maybe the -P switch is what you want. You can use then the following construct:
#!/usr/bin/perl -P #define MYPATH "/WEBDEVELOPMENT/cgi-bin/postcode.txt" read_in_file(); sub read_in_file { open(INPUTFILE, "<".MYPATH."postcode.txt"); }
That way you can define things at the top of your file and use the defined values through your code. See perlman:perlrun for more information about that switch.
--
Alfie

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2022-05-20 15:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (73 votes). Check out past polls.

    Notices?