On 2012-08-08 12:17, Sandip Karale wrote:
use File::Spec::Functions;
my $f="foo.txt";
my $d="machdir";
Try:
my $d = '//mach/dir';
print "$f \n";
print "$d \n";
print catfile($d,$f);
--
Ruud
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands
Per the message by Mr. Adigun, using a single quote instead of double quotes
tells perl not to interpolate the string. That will prevent it from eating all
those backslashes.
Paul Anderson -- VE3HOP
On 2012-08-09, at 8:53 AM, Sandip Karale wrote:
> Hi Shlomi,
>
> Thanks for your re
Hi Shlomi,
Thanks for your reply.
my $d="machdir"; This UNC path I'm getting from arguments, and
then I want to process it. That is I want to concatenate the file name to
it and open the file and print its contents. So your solution will not help.
Sincerely,
Sandip
On Wed, Aug 8,
Hi,
Please, check my comments below
On 8/8/12, Sandip Karale 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="machdir";
>
Instead of the above,
Hi Sandip,
On Wed, 8 Aug 2012 15:47:24 +0530
Sandip Karale wrote:
> Hello ,
>
> I'm new to perl.
>
> I am on windows 7 64 bit machine. with Strawberry Perl (64-bit)
> 5.14.2.1.
It's good that you are using Strawberry Perl.
>
> *My Code:*
>
> use File::Spec::Functions;
> my $f="foo.txt";
>
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="machdir";
print "$f \n";
print "$d \n";
print catfile($d,$f);
*Output:*
*
*
foo.txt
mach\\dir
\mach\dir\foo.txt
*M