Wiggins d'Anconia wrote:
Gupta, Sharad wrote:
I miscommunicated here, by path i did'nt meant the PATH env variable.
By Path i meant any string having some directories seperated by ":" , say it could be
FOO=E:\foo:D:\bar.
And yes it can be in the %ENV.
-Sharad
How about:
my @paths = split(/:(?!\\)/, $path;
Should be:
my @paths = split(/:(?!\\)/, $path);
http://danconia.org
perldoc perlre for more essentially it is using a zero-width negative look ahead assertion. At least I think :-)......
http://danconia.org
-----Original Message----- From: Casey West [mailto:[EMAIL PROTECTED] Sent: Saturday, August 02, 2003 3:12 PM To: Gupta, Sharad Cc: [EMAIL PROTECTED] Subject: Re: Splitting a path
It was Saturday, August 02, 2003 when Gupta, Sharad took the soap box, saying:
: : Hi,
: : I have a path which may look like:
use Env [EMAIL PROTECTED];
print "$_\n" foreach @PATH;
I love the Perl core. :-)
For more information read http://search.cpan.org/perldoc?Env
Casey West
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]