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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

split by '\'

Status
Not open for further replies.

EchoCola

Programmer
Apr 13, 2004
48
US
Hello all im trying to split a path with no luck
Code:
$str = 'C:\one\two\three';


@ray = split("/\\/",$str);


print"\n Here is the contents of \@ray: @ray[1]\n";

After this executes it doesn't perfrom the join and it's all put in the first value of the array.
 
Nevermind,the problem was with the quotes its supposed to be
Code:
split(/\\/,$str);
NOT
Code:
split("/\\/",$str);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top