rogermills has asked for the wisdom of the Perl Monks concerning the following question:
Thanks a lot Rogeruse strict; use warnings; use POSIX qw( strftime ); ## Global variable my $svnlook = "D:\\Subversion\\bin\\svnlook.exe"; my $repo_path = $ARGV[ 0 ]; my $txn_name = $ARGV[ 1 ]; my $argNum = 0; my $committer = ""; my $commitlog = ""; my @log = ""; my $cnr_number = ""; # get committer $committer = "$svnlook author $txn_name $repo_path" or die "Unable to +get committer with svnlook.\n"; chomp($committer); #Get commit log $commitlog = "$svnlook log $txn_name $repo_path" or die "Unable to get + log message with svnlook.\n"; chomp($commitlog); # get CNR number @log = ($commitlog); $cnr_number = (grep(/"^CNR[0-9]"/, @log)); if ($cnr_number eq "") { print "You must enter a valid CNR"; exit1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using grep on windows
by ikegami (Patriarch) on Oct 27, 2009 at 17:18 UTC | |
by rogermills (Initiate) on Oct 27, 2009 at 20:56 UTC | |
by ikegami (Patriarch) on Oct 27, 2009 at 20:58 UTC | |
by rogermills (Initiate) on Oct 27, 2009 at 21:05 UTC | |
by rogermills (Initiate) on Oct 27, 2009 at 21:10 UTC | |
by ikegami (Patriarch) on Oct 27, 2009 at 21:20 UTC | |
|
Re: Using grep on windows
by Fletch (Bishop) on Oct 27, 2009 at 17:09 UTC | |
by JavaFan (Canon) on Oct 27, 2009 at 17:20 UTC | |
by ikegami (Patriarch) on Oct 27, 2009 at 17:42 UTC | |
by Bloodnok (Vicar) on Oct 27, 2009 at 17:40 UTC | |
by ikegami (Patriarch) on Oct 27, 2009 at 17:45 UTC | |
|
Re: Using grep on windows
by Bloodnok (Vicar) on Oct 27, 2009 at 17:27 UTC |