Another example...
print "$newdefined already registered!";
}
else {
push (@myNames, $newdefined);
}
Code:
if (grep $newdefined eq $_, @myNames) { print "$newdefined already registered!";
}
else {
push (@myNames, $newdefined);
}
Subject | Author | Views | Date |
---|---|---|---|
push new element to array | courierb | 10444 | Sep 28, 2007, 12:21 PM |
Re: [courierb] push new element to array | tandat | 10138 | Sep 29, 2007, 12:35 AM |
Re: [tandat] push new element to array | Wychwood | 10158 | Sep 29, 2007, 2:11 AM |
Re: [Wychwood] push new element to array | courierb | 10033 | Sep 30, 2007, 6:41 AM |
Re: [Wychwood] push new element to array | courierb | 10058 | Sep 30, 2007, 6:51 AM |
Re: [tandat] push new element to array | courierb | 10052 | Sep 30, 2007, 6:53 AM |
Re: [tandat] push new element to array | courierb | 10009 | Oct 1, 2007, 1:02 AM |
Re: [courierb] push new element to array | tandat | 9990 | Oct 1, 2007, 5:36 AM |
Re: [tandat] push new element to array | courierb | 9932 | Oct 1, 2007, 1:58 PM |
Re: [tandat] push new element to array | courierb | 9929 | Oct 1, 2007, 3:34 PM |
Re: [courierb] push new element to array | tandat | 9913 | Oct 1, 2007, 6:59 PM |
Re: [tandat] push new element to array | courierb | 9900 | Oct 2, 2007, 4:35 AM |
Re: [courierb] push new element to array | courierb | 9833 | Oct 3, 2007, 12:09 AM |