you can use the Cwd module: use Cwd; my @vars = split(/\//, cwd); # or in your case ($var1, $var2, $var3, $var4) = split(/\//, cwd);
I believe, even on windows, cwd will return the directory path with "/"s instead of "\"s FlashGuy wrote: > Hi, > > How can I retrieve the directory path and split the results into separate variables >based on the "\" > > Example: > > d:\temp\test\files> > > Split: > > var1: d: > var2: temp > var3: test > var4: files > > > > > > -- Samy Kamkar -- cp5 -- [EMAIL PROTECTED] LucidX.com / LA.pm.org / code.LucidX.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]