View Single Post
  #1 (permalink)  
Old February 6th, 2007, 11:52 PM
Freedolen Freedolen is offline
Registered User
Join Date: Feb 2007
Location: Chennai, TamilNadu, India.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using ARGV in Perl

Hi All,

 I am new to this Forum.

Below is my perl script:

use strict;
use warnings;

print "First Argument: $ARGV[0]";
print "\n********************\n";
print "Second Argument: $ARGV[1]";

and i save the code in a file

When I execute this with arguments
perl "D:\First Folder\test\" "D:\Second Folder"

The Output shown was:
First Argument: D:\First Folder\test" D:\Second
Second Argument: Folder

The Output what I expect is:
First Argument: D:\First Folder\test
Second Argument: D:\Second Folder

Is there any idea to get the output what i expect, without changing Backward slashes to Forward slashes or Deleting the Final slash in First argument

Thanks in Advance