Hello Monks,
Once again I seek your wise wisdom. I am trying to include a file across multiple web servers and I am having a terrible time with it. I first tried a simple open statement.
open(MENU, "\\\\servername\\sharename\\path\\tofile.inc") or die "Cann
+ot open: $!";
while (<MENU>) {print}
close MENU;
And regardless of the permissions I put on the 2003 box it tells me permission denied.
And then I tried a LWP::Simple script:
#! C:/perl/bin/perl.exe -w
use strict;
use CGI::Carp qw(fatalsToBrowser);
use LWP::Simple;
my $webpage = get("http://servername/global/admin_menu.inc");
die "Couldn't get it: $!" unless defined $webpage;
print "Content-type: text/html\n\n";
print $webpage;
It gives me "Bad file descriptor"
Any way to send the permissions of the web browser to the other server? Either LWP::Simple or an open solution would work. Please point me in the right direction. Thanks in advance.
Update: fixed typo.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.