
252 S.E.2d 168 (1979)
STATE ex rel. R. C. F.
v.
Howard W. WILT, Sheriff.
No. 14264.
Supreme Court of Appeals of West Virginia.
December 19, 1979.
*169 J. Wendell Reed, Shepherdstown, for relator.
Chauncey H. Browning, Atty. Gen., David F. Greene, Asst. Atty. Gen., Charleston, for respondent.
McGRAW, Justice:
In this original habeas corpus proceeding, before this Court pursuant to W.Va.Code § 53-4-1, we are urged to award the writ and discharge the relator from further confinement in a jail, which we have done. The underlying issue presented for determination is whether a circuit court or a juvenile referee has any statutory authority under this state's juvenile statute to incarcerate in a county jail, prior to an adjudication of delinquency, a child under eighteen years of age who is being proceeded against as a juvenile delinquent for the commission of a criminal offense. We answer in the negative and award the writ.
The relator is a 17-year-old indigent resident of Jefferson County who has been confined in the Jefferson County jail on three different occasions in 1978, on delinquency petitions charging him with the commission of theft offenses. According to an affidavit filed by the sheriff, the relator has been held in the county jail for more than twenty-seven days in 1978. The jail, according to the affiant, has no separate section designed for detaining juveniles exclusively. As a result, relator has been housed in a solitary cell ordinarily utilized to confine adults.
The confinement which led up to this proceeding began on September 8, 1978, when the relator was taken into custody and detained in the county jail without a warrant or order of the circuit court or juvenile referee.[1] Following a detention hearing on September 11, 1978, the juvenile referee ordered the further detention of relator in the county jail and set bond at $250.00. A preliminary hearing was held on September 13, 1978, wherein probable cause was found for further detention, and the juvenile referee refused a request to release the child on his own recognizance. The relator remained in custody until September 18, 1978, when this Court issued a show cause order directed to the sheriff requiring him to show legal justification for relator's continued restraint. Contemporaneously, the Department of Welfare was made a party respondent and was directed to immediately take custody of the relator and to maintain him in the manner provided for by law until further order of this Court.
Relator relies principally on W.Va.Code § 49-5A-2 [1977], the first portion of which requires that children taken into custody by any officer or employee of the state, or any political subdivision thereof, shall forthwith be given a detention hearing. The relevant portion of that section states:
It shall be the duty of the judge or referee to avoid incarceration of such child in any jail. Unless the circumstances of the case otherwise require, taking into account the welfare of the child as well as the interest of society, such child shall be released forthwith into the custody of his parent or parents, relative, custodian or other responsible adult or agency.
Respondent's brief does not directly address the question presented by the case but does assert that unconditional release from custody is inappropriate.
The above-cited statutory provision by its terms imposes a duty on trial court judges and juvenile referees in this state to *170 "avoid", that is, to "keep away from or refrain from," Websters Third New International Dictionary 151 (1964), incarcerating a child in any jail.
It is a basic rule that the word "shall" is mandatory in the absence of any contrary intention expressed in the statute. See, e. g., Terry v. Sencindiver, 153 W.Va. 651, 171 S.E.2d 480 (1969). The question remains, however, as to whether the Legislature intended an absolute prohibition against preadjudication confinement of juveniles in county jails. If the Legislature did so intend, then circuit court judges and juvenile referees are without statutory authority to order such confinement.
As in all questions involving the application or construction of legislative enactments, the Court is concerned with ascertaining and effectuating legislative intent. A proper resolution of the question presented here thus requires that other provisions of our juvenile delinquency statute be looked to and construed together in order that the legislative intent can be gathered from the whole and be given effect.
Other legislative enactments governing the detention or incarceration of children provide substantial guidance in answering the issue presented. Under the terms of W.Va.Code § 49-5-16(a) [1978],[2] a child under eighteen years of age may never be committed to a common or county jail or police station, although in certain specified instances a child may be held in the juvenile department of a jail or housed in a juvenile detention portion of a county facility. Under subsection (b) thereof, no child convicted of a criminal offense under the adult jurisdiction of the circuit court shall be held in custody in a penitentiary of this state, and the child cannot be transferred from a secure juvenile facility to a penitentiary after he attains the age of eighteen, unless in the judgment of both the court which committed the child and the commissioner of the department of corrections such transfer is appropriate.
If circuit courts and juvenile referees have no statutory authority to confine in county jails children who have been adjudicated delinquent for criminal acts, and if circuit courts are denied authority to sentence a child convicted under the adult jurisdiction of the circuit court to confinement in a penitentiary, then a fortiori, circuit courts and juvenile referees lack statutory authority to incarcerate children not yet adjudicated delinquent in county jails.
Additionally, the Legislature, recognizing the need for standards governing detention facilities and institutions, has mandated by W.Va.Code § 49-5-16(a) [1978] the promulgation of rules and regulations guaranteeing to children at a minimum certain enumerated rights.
Effective January 1, 1979, a child shall not be: (1) punished by physical force; (2) *171 deprived of nutritious meals; (3) deprived of family visits; or (4) placed in solitary confinement. Except for sleeping hours, a child in a state facility shall not be locked alone in a room unless such child is out of control. And a child shall be: (1) given the opportunity to participate in physical exercise each day; (2) provided his own clothing or be provided clean, individualized clothing; (3) provided daily access to showers or other bathing facilities; (4) provided constant access to writing materials; (5) protected in the right to send and receive mail without limitation, censorship or prior reading, subject solely to inspection for contraband; (6) allowed to make and receive regular telephone calls without charge; (7) allowed to make and receive long distance calls to his or her family without charge at least once a week; (8) allowed to receive visitors daily and on a regular basis; (9) provided immediate access to medical care as needed; (10) provided access to education, including teaching, educational materials and books; (11) afforded reasonable access to a lawyer upon request; and (12) afforded a grievance procedure, including an appeal mechanism.
The Legislature has also provided that a child, immediately upon admission to a jail facility or institution, shall be furnished with a copy of the rights herein defined.
The Legislature has recognized in its wisdom that the incarceration of juveniles in a jail with adult offenders violates the fundamental rehabilitative purpose of a juvenile system.[3] The loss of liberty and the exposure of juveniles to adult offenders even for a short time can do but ill for the child. The theory held by some well-meaning but untrained and misguided souls that the "shock effect" of temporary incarceration can be beneficial to juveniles is hereby specifically disapproved. The confinement of juveniles in jails is a precursor to suicide, to sexual and physical abuse and to psychological harm; the confinement of juveniles with adults in poorly constructed, ill-equipped and sometimes mismanaged jails may well contribute to crime rather than reduce it.
As an alternative to detaining children charged with juvenile delinquency in county jails, the Legislature enacted W.Va.Code § 49-2-16 [1973] which reads in part that, "The state department of welfare shall provide care in special boarding homes for children needing detention pending disposition by a court having juvenile jurisdiction or temporary care following such court action."[4] It is the duty of the courts of this state to see that children needing detention be cared for as the Legislature has mandated.
In some counties in the state, however, there are no special boarding homes or juvenile detention facilities available for the incarceration of those few children charged with juvenile delinquency who require detention prior to adjudication and disposition. The Legislature, being aware of such problems, empowered circuit courts and juvenile referees with the authority to order detention of a child in another county where no juvenile detention facility exists in the home county. W.Va.Code § 49-5A-5 [1978] states:
If further detention is ordered the court may order or referee direct such child to be detained in a facility other than jail in a county other than the county in which such court sits if no facility *172 other than a jail exists in the county wherein the court sits.
Based on the foregoing statutory provisions, we hold that it is unlawful for circuit courts and juvenile referees to incarcerate a child under eighteen years of age in a common county jail prior to an adjudication of delinquency.[5] Those provisions clearly manifest a legislative judgment that children will not be rehabilitated by detention in county jails along with adult offenders, and that detention, when necessary, in other types of facilities maintained exclusively for juveniles is more consistent with the rehabilitative goals of our juvenile delinquency legislation.
Accordingly, the writ as prayed for is awarded.
Writ awarded.
NOTES
[1]  W.Va.Code § 49-5-8 [1978] delineates the circumstances under which a juvenile may be taken into custody and outlines the procedures to be followed by the appropriate authorities thereafter. The relator does not challenge the propriety of the officials' actions in taking him into custody, nor the procedures followed thereafter, thus we do not address the question whether further detention was warranted in this case.
[2]  That section reads:

(a) A child under eighteen years of age shall not be committed to a jail or police station, except that any child over fourteen years of age who has been committed to an industrial home or correctional institution may be held in the juvenile department of a jail while awaiting transportation to the institution for a period not to exceed ninety-six hours, and a child over fourteen years of age who is charged with a crime which would be a violent felony if committed by an adult, may, upon an order of the circuit court, be housed in a juvenile detention portion of a county facility, but not within sight of adult prisoners. A child charged with or found to be delinquent solely under subdivision (3), (4) or (5), section four [§ 49-1-4], article one of this chapter, shall not be housed in a detention or other facility wherein persons are detained for criminal offenses or for delinquency involving offenses which would be crimes if committed by an adult: Provided, that a child who is adjudicated delinquent under subsection (5), section four [§ 49-1-4], article one of this chapter and who has violated an order of probation or contempt order arising out of a proceeding wherein the child was adjudicated delinquent for an offense which would be a crime if committed by an adult may not be housed in a detention or other facility wherein persons are detained who have not been adjudicated delinquent for such offenses.
(b) No child who has been convicted of an offense under the adult jurisdiction of the circuit court shall be held in custody in a penitentiary of this State: Provided, however, That such a child may be transferred from a secure juvenile facility to a penitentiary after he shall attain the age of eighteen years, if in the judgment of the commissioner of the department of corrections and the court which committed such child, such transfer is appropriate.
[3]  At least five other states have enacted statutes absolutely prohibiting the pretrial confinement of juveniles with adults, and the Joint Commission on Juvenile Justice Standards appointed by the Institute of Judicial Administration and the American Bar Association has adopted a standard prohibiting the interim confinement of juveniles in any facility or part thereof also used to detain adults. See Inst. of Jud. Ad., ABA, Juv. Just. Standards Project, Standards Relating to Interim Status § 10.2 (Tent.Draft 1977).
[4]  Federal legislation has been enacted to assist the states in their effort to put an end to the pretrial detention of juveniles in facilities utilized to incarcerate adults. This enactment conditions eligibility for delinquency prevention monies on the submission of a state plan which assures no juvenile shall be detained in facilities with adults. See Juvenile Justice and Delinquency Prevention Act of 1974, 42 U.S.C. § 5633(13) (1971).
[5]  A child who allegedly commits an act of juvenile delinquency in violation of federal statutes, is afforded substantial statutory protection against pre-disposition detention in inappropriate facilities:

A juvenile alleged to be a delinquent may be detained only in a juvenile facility or such other suitable place as the Attorney General may designate. Whenever possible, detention shall be in a foster home or community based facility located in or near his home community. The Attorney General shall not cause any juvenile alleged to be a delinquent to be detained or confined in any institution in which the juvenile has regular contact with adult persons convicted of a crime or awaiting trial on criminal charges. Insofar as possible, alleged delinquents shall be kept separate from adjudicated delinquents . . . 18 U.S.C. § 5035 (1974).
