bkiahg has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,

I am trying to keep a menu across servers. It's an include file and I need a way to access it like a mapped drive when the server is logged off. Is there any modules that perform this, and/or what direction should I go? It's a 2000 server trying to access a file on a 2003 server, also running IIS. I've tried.
open(MENU, 'http://servername/global/admin_menu.inc') or die "$!"; open(MENU, '\\servername\global\admin_menu.inc') or die "$!"; open(MENU, '\\servername\share_name\global\admin_menu.inc') or die "$! +"; open(MENU, '//servername/global/admin_menu.inc') or die "$!"; while (<MENU>) {print} close MENU or die "$!";
Any guidance is greatly appreciated.

Replies are listed 'Best First'.
Re: Accessing Network Resources When Logged Off - IIS
by halley (Prior) on Jun 14, 2004 at 17:30 UTC
    Your logic above is broken; if any attempt succeeds, you undo it by trying another method. If you don't care about trying a lot of possibly broken path alternatives, you could do this:
    open(MENU, $bestpath ) or open(MENU, $nextbest ) or open(MENU, $worseway ) or open(MENU, $fallback ) or die "No way to reach it!"; do_stuff_with MENU; close(MENU) or die "Scary failure trying to close it!";
    If you're just asking what the right syntax would be for a UNC path, it's \\netbioshost\sharename\path\to\file.ext.

    --
    [ e d @ h a l l e y . c c ]

      Those were just the different combinations I tried. I didn't use them all at the same time. Sorry for the confusion.

      Update: Thanks halley the UNC path did the trick.