[Pdx-pm] Win32 network files

jerry gay jerry.gay at gmail.com
Fri Mar 24 17:17:23 PST 2006

On 3/22/06, Kris Bosland <krisb at ring.org> wrote:
>         Has anyone accessed network disks on Win32 in perl?
D:\usr\local\parrot\trunk>perl -MFile::Spec::Functions=catdir -e"print
'hello' if -d catdir qw{ //machina d$ usr local parrot trunk }"

where my machine name is 'machina' and 'd$' is a file share. to use
your example,

> perl -e "print qq{hello\n} if -f q{\\a\b\c}" doesn't.
perl -MFile::Spec::Functions=catfile -e "print qq{hello\n} if -f
catfile qw{//a b c}"

of course, if the dir or file names have embedded spaces, you'll have
to use something other than qw{}.

More information about the Pdx-pm-list mailing list