Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: netBEUI win32 CGI and other stuff

by Anonymous Monk
on May 26, 2000 at 11:45 UTC ( #14936=note: print w/replies, xml ) Need Help??

in reply to netBEUI win32 CGI and other stuff

Opps this should be readable
this is a bit cleaner.
open(FH, "//server/path/to/file") or die $!;
print while(<FH>);
close (FH);

for a bit of an explanation:
Perl sees the \ as a meta escape in " strings.
"\\server\path\to\file" becomes "serverpathtofile"
there are the solutions:

double slashes:
unix path symantics:
this works because perl understands both even on NT
' quoted string
this works because single quoted strings ignore meta chars.

Hope this helped.


Replies are listed 'Best First'.
Re: Re: netBEUI win32 CGI and other stuff
by demerphq (Chancellor) on Mar 05, 2002 at 13:51 UTC

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2016-10-25 06:34 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (315 votes). Check out past polls.