Re: missing curly - brain fried
- From: jbuburuz@xxxxxxxxxxxxxxx
- Date: Thu, 28 Jun 2007 11:23:09 -0400 (EDT)
Where is the open curly missing here?
#!/usr/bin/perl
@array = (5,3,2,1,4);
for ($i=0; $i<$n-1; $i++) {
I think its missing on the line bellow. I count three brackets bellow.
( for ($j=0; $j<$n-1-$i; $j++)
if ($array[$j+1] < $array[$j]) { /* compare the two neighbors
*/
$tmp = $array[$j]; /* swap $array[j] and $array[j+1]
*/
$array[$j] = $array[$j+1];
$array[$j+1] = $tmp;
}
}
foreach $elem (@array){
print "$elem";
}
.
- References:
- missing curly - brain fried
- From: Amichai Teumim
- missing curly - brain fried
- Prev by Date: Re: missing curly - brain fried
- Next by Date: Re: printing content of found file
- Previous by thread: Re: missing curly - brain fried
- Next by thread: Re: missing curly - brain fried
- Index(es):