It is a well- known phenomenon but nonetheless still remarkable: quantum fluctuations in the vacuum give rise to measurable physical manifestations, i.e. what is called the Casimir energy (or force). The classic example is that of two parallel conducting plates in vacuum attracting each other with a Casimir force proportional to 1/d4 where d is the plate separation. In this work, we obtain as a function of D the Casimir energy of the longitudinal (acoustic) modes of a relativistic perfect fluid confined to a hypercube with D spatial dimensions. Our results show that there exists a critical dimension D=36 for Dirichlet boundary conditions (field is zero on boundaries). For D36, the Dirichlet Casimir force is always attractive. For Neumann boundary conditions (derivative of field is zero) there is no critical dimension and the force is attractive for all D. Before starting directly with the general D-dimensional case, we illustrate our procedure with a simple one-dimensional object: the Bosonic string.