Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

control+m

Status
Not open for further replies.

superstarjpmc

Programmer
Jan 22, 2004
38
US
Hi,

I have the following in a perl data structure.

TRG_FILE => "\\\\CDCTS09\\MYDIR\\DROPBOXES\\receive_from\\$$xml_params{FileName}",

When the same is resolved.. i'm getting a Cntrl+M char getting replace for '\receive_from'. i.e for the slash-r.

Please could anyone hlp to resolve this. The OS is Unix.

thanks
dj
 
The obvious question is why use backslashes when you could use forward slashes?
Windoze tends to cope with them fine and it makes the code soooo much easier to deal with.


Trojan.
 
I think the first question is why are you using windows? All Unix and Linux distributions that I have seen have the bash shell. The bash shell makes perl so much easier, and it's a good idea in general to be using Linux/Unix.
 
Actuall the datastructure I've mentioned is used to generate a WINDOWS bat file. Thats the reason why you see windows style !

Any hlp to my problem ?
 
how about...
Code:
my $path = "//CDCTS09/MYDIR/DROPBOXES/receive_from/$$xml_params{FileName}";

$path =~ s/\//\\/g;

TRG_FILE => $path;

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top