in reply to Re: Substitution in Perl
in thread Substitution in Perl
What does the following lines mean?
sub getTargets { #getTargets($makeInfoRef->{$makeId}{cmd}) my $arg = $_[0]; my $cmd = $arg; $cmd =~ s/.*&&\s*\w*make //; $cmd =~ s/^\w*make //; $cmd =~ s/-+[\w-]+=?\s*[\w\.\:\;\\\/]*\s+//g; my @tmp = split(/\s+/,$cmd); return @tmp; }
Actually the "cmd" variable has
"emake --emake-cm=aceaagent01.mw.na.cat.com --emake-emulation=gmake --emake-root=Y:\; --emake-autodepend=1 --emake-tmpdir=d:\temp --emake-clearcase=vobs --emake-annodetail=file --win32 --keep-going -f Makefile_a4e4i3_serv_test_a4 --emake-class=BE_CM --emake-build-label=BE_T4F_ALPHA_6_BASE_2_ECJob39384 --emake-annofile=serv_test_a4_anno.xml --emake-historyfile=serv_test_a4_emake.data -B lib"So finally what wil be returned by that sub function? Can anyone explain me the logic behind this fuction?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Substitution in Perl
by CountZero (Bishop) on Oct 21, 2010 at 06:27 UTC | |
by nasreen (Initiate) on Oct 25, 2010 at 07:29 UTC |