DS has asked for the wisdom of the Perl Monks concerning the following question:
I want to capture the following :\nb\v5\srcccc\ans.cpp@@\main\
I am doing the following :$dir = nb; $subDir = v5; $file = ans.cpp
I am not able to get the $subDir why ????while (<INFILE>) { if(/\\([^\\]+).*?(\w+\.cpp)/) { push @thing, [$1,$2,$3]; } } for (@thing) { my ($dir,$subDir,$file) = @$_;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: parsing a path
by tye (Sage) on Jul 17, 2002 at 16:59 UTC | |
|
Re: parsing a path
by kvale (Monsignor) on Jul 17, 2002 at 16:52 UTC | |
by DS (Acolyte) on Jul 17, 2002 at 18:23 UTC | |
|
(joshua)Re: parsing a path
by joshua (Pilgrim) on Jul 17, 2002 at 17:12 UTC | |
by Juerd (Abbot) on Jul 17, 2002 at 17:30 UTC | |
by joshua (Pilgrim) on Jul 17, 2002 at 18:14 UTC | |
by softworkz (Monk) on Jul 18, 2002 at 18:01 UTC |