我是个新手,请多帮助
以下是我的code和output. (注意,debug通过了)
Code:
if (defined $HISTORY) {
@date = split( /#/, $HISTORY);
for ($count=0; $count<10; $count++) {
if ($date[$count] =~ /Approved by/ || $date[$count]
=~ /Checked In/ ) {
print color 'bold blue';
print "Test Description:";
print color 'reset';
print "$date[$count]\n";
}
}
}
@date is an array of scalar data and i'm trying to print out the strings with "Approved by" or "Checked In". The outputs does print out what I want but the listed output below is what i don't want to display. Any idea on how not to display that and only what i want? Thanks.
Output:
Use of uninitialized value in pattern match (m//)
以下是我的code和output. (注意,debug通过了)
Code:
if (defined $HISTORY) {
@date = split( /#/, $HISTORY);
for ($count=0; $count<10; $count++) {
if ($date[$count] =~ /Approved by/ || $date[$count]
=~ /Checked In/ ) {
print color 'bold blue';
print "Test Description:";
print color 'reset';
print "$date[$count]\n";
}
}
}
@date is an array of scalar data and i'm trying to print out the strings with "Approved by" or "Checked In". The outputs does print out what I want but the listed output below is what i don't want to display. Any idea on how not to display that and only what i want? Thanks.
Output:
Use of uninitialized value in pattern match (m//)