Molecular beacons are sensitive fluorescent probes hybridizing selectively to designated DNA and RNA targets. They have recently become practical tools for quantitative real-time monitoring of single-stranded nucleic acids. Here, we comparatively study the performance of a variety of such probes, stemless and stem-containing DNA and PNA (peptide nucleic acid) beacons, in Tris-buffer solutions containing various concentrations of NaCl and MgCl(2). We demonstrate that different molecular beacons respond differently to the change of salt concentration, which could be attributed to the differences in their backbones and constructions. We have found that the stemless PNA beacon hybridizes rapidly to the complementary oligodeoxynucleotide and is less sensitive than the DNA beacons to the change of salt thus allowing effective detection of nucleic acid targets under various conditions. Though we found stemless DNA beacons improper for diagnostic purposes due to high background fluorescence, we believe that use of these DNA and similar RNA constructs in molecular-biophysical studies may be helpful for analysis of conformational flexibility of single-stranded nucleic acids. With the aid of PNA "openers", molecular beacons were employed for the detection of a chosen target sequence directly in double-stranded DNA (dsDNA). Conditions are found where the stemless PNA beacon strongly discriminates the complementary versus mismatched dsDNA targets. Together with the insensitivity of PNA beacons to the presence of salt and DNA-binding/processing proteins, the latter results demonstrate the potential of these probes as robust tools for recognition of specific sequences within dsDNA without denaturation and deproteinization of duplex DNA.