CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
requires requires requires

 



yotam_k
Deleted

Jan 26, 2001, 2:50 PM

Post #1 of 12 (4384 views)
requires requires requires Can't Post

Somwone please tell me the contex of how requiring a file .
can you use in your answer this file :
"/forum/forum1-1.pl"

Thank You All
Yotam.




modified
Deleted

Jan 26, 2001, 6:00 PM

Post #2 of 12 (4383 views)
Re: requires requires requires [In reply to] Can't Post


Code
require "./forum/forum1-1.pl";



yotam_k
Deleted

Jan 27, 2001, 2:51 AM

Post #3 of 12 (4378 views)
Re: requires requires requires [In reply to] Can't Post

Can I require A function?
Should I write In the Top Of the file I want to require :
#!/usr/bin/perl ?

Yotam.




modified
Deleted

Jan 27, 2001, 7:19 AM

Post #4 of 12 (4370 views)
Re: requires requires requires [In reply to] Can't Post

When you require a file, you take all of the subroutines in that file and make them usable in your script.



yotam_k
Deleted

Jan 27, 2001, 8:03 AM

Post #5 of 12 (4368 views)
Re: requires requires requires [In reply to] Can't Post

So I can't include :
sub xyz {
}
?




Jasmine
Administrator / Moderator

Jan 27, 2001, 9:04 AM

Post #6 of 12 (4366 views)
Re: requires requires requires [In reply to] Can't Post

You *are* including subroutine xyz if that sub is in the file you required.

Perhaps we're misunderstanding?



yotam_k
Deleted

Jan 27, 2001, 11:07 AM

Post #7 of 12 (4364 views)
Re: requires requires requires [In reply to] Can't Post

The problem is that i can't understand why my program returns 500 Error when I am doing exectly what you are saying ...




modified
Deleted

Jan 27, 2001, 1:22 PM

Post #8 of 12 (4362 views)
Re: requires requires requires [In reply to] Can't Post

Do you have the -T switch on?



yotam_k
Deleted

Jan 27, 2001, 2:38 PM

Post #9 of 12 (4361 views)
Re: requires requires requires [In reply to] Can't Post

God....
Now you'v questioned something I realy Can't Say...
I am using A free hosting service That I think you know
It's virtualave.net .
I realy Can't say if the have what you'v asked me for , but If you think it's realy nessecery I'll Ask them...

But thank you very much...
Yotam.



modified
Deleted

Jan 27, 2001, 7:07 PM

Post #10 of 12 (4357 views)
Re: requires requires requires [In reply to] Can't Post

No, no. Okay you dont have the -T switch. Some people (like myself) like to have our shebangs say:


Code
#!/usr/bin/perl -T 
[/pre

-T or Taint is Perl's built in security system. :)



zanardi
journeyman

Jan 27, 2001, 8:19 PM

Post #11 of 12 (4355 views)
Re: requires requires requires [In reply to] Can't Post

i preffer:


Code
#!/usr/bin/perl -wT 
use strict;

:)

My BBS


modified
Deleted

Jan 27, 2001, 8:52 PM

Post #12 of 12 (4353 views)
Re: requires requires requires [In reply to] Can't Post

I use


Code
#!/usr/bin/perl -Tw

But I just realized that it's the same thing. :x

I would use strict, but I can't seem to figure out how to make my scripts complaint with strict. I figured out the Taint stuff from an FAQ.. but cant find anything for strict. :|


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives