Hi,
Please, check my comments below

On 8/8/12, Sandip Karale <sandipkar...@gmail.com> wrote:
> Hello ,
>
> I'm new to perl.
>
> I am on windows 7 64 bit machine. with Strawberry Perl (64-bit) 5.14.2.1.
>
> *My Code:*
>
> use File::Spec::Functions;
> my $f="foo.txt";
> my $d="\\\\\\\\mach\\\\dir";
>
Instead of the above, you can use this:
my $f='foo.txt';
my $d='\\\\mach\\dir';

> print "$f \n";
> print "$d \n";
> print catfile($d,$f);

print $f,"\n";
print $d,"\n";
print catfile($d,$f);

OUTPUT
foo.txt
\\mach\dir
\\mach\dir\foo.txt

Please, read the subheading "Quote and Quote-like Operators " under
the documentation of perldoc perlop for more info.

> *Output:*
> *
> *
> foo.txt
> \\\\mach\\dir
> \mach\dir\foo.txt
>
> *My Problem:*
> *
> *
> After concatenating with UNC path and file, the concatenated path is wrong!
> the expected path is \\mach\dir\foo.txt
> Please help me out if I'm missing something.
>
> Sincerely,
> Sandip
>


-- 
Tim

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to