P
papaDoc
Hi,
I'm trying to parse the output of CVS loginfo to update the script
activitymail and I have a problem.
I'm able to parse the line but I don't like the way I'm doing it.
Can you help me get rid of the $delim variable which I need in my
current algo ?
I want to get a list like this
@dest[0] = "excavator_resources.h 1.129 1.130.23"
@dest[0] = "gfxGround.cpp 1.12 1.13"
etc
#!C:/DevTools/mks/mksnt/perl.exe
#
$src = "excavator_resources.h 1.129 1.130.23 gfxGround.cpp 1.12 1.13
mgrDemo.cpp 1.72 1.73 objExcavator.cpp 1.42 1.43 pedModule_Digging.cpp
1.25 1.26 pedModule_DumpTrench.cpp 1.18 1.19 pedModule_DumpTruck.cpp
1.27 1.28 pedModule_TargetSearch.cpp 1.17 1.18 pedTerrainDef.cpp 1.6
1.7 pedTrenchDef.cpp 1.18 1.19 pedTrial_DumpTruck.cpp 1.28 1.29
playback.cpp 1.1 1.2 .configrc 1.2 1.3 ~configrc 1.2 1.3";
$delim =
"This-Is-A-Simlog-Delimiter-And-No-Filenames-Should-Be-Called-This";
$src =~ s/([\d\.]+\s[\d\.]+)\s(\S)/\1$delim\2/g;
@dest = split( /$delim/ , $src);
print "\n";
foreach $d (@dest)
{
print "($d)\n";
}
print "\n";
Remi
(e-mail address removed)
I'm trying to parse the output of CVS loginfo to update the script
activitymail and I have a problem.
I'm able to parse the line but I don't like the way I'm doing it.
Can you help me get rid of the $delim variable which I need in my
current algo ?
I want to get a list like this
@dest[0] = "excavator_resources.h 1.129 1.130.23"
@dest[0] = "gfxGround.cpp 1.12 1.13"
etc
#!C:/DevTools/mks/mksnt/perl.exe
#
$src = "excavator_resources.h 1.129 1.130.23 gfxGround.cpp 1.12 1.13
mgrDemo.cpp 1.72 1.73 objExcavator.cpp 1.42 1.43 pedModule_Digging.cpp
1.25 1.26 pedModule_DumpTrench.cpp 1.18 1.19 pedModule_DumpTruck.cpp
1.27 1.28 pedModule_TargetSearch.cpp 1.17 1.18 pedTerrainDef.cpp 1.6
1.7 pedTrenchDef.cpp 1.18 1.19 pedTrial_DumpTruck.cpp 1.28 1.29
playback.cpp 1.1 1.2 .configrc 1.2 1.3 ~configrc 1.2 1.3";
$delim =
"This-Is-A-Simlog-Delimiter-And-No-Filenames-Should-Be-Called-This";
$src =~ s/([\d\.]+\s[\d\.]+)\s(\S)/\1$delim\2/g;
@dest = split( /$delim/ , $src);
print "\n";
foreach $d (@dest)
{
print "($d)\n";
}
print "\n";
Remi
(e-mail address removed)