Particle-in-cell simulations of the absorption of an ultrashort and ultraintense laser pulse at structured targets are presented. The targets consist of a bunch of parallel or tapered carbon nanowires. Such targets are effective in generating large currents of relativistic electrons, propagating along the wires and following their curvature. Focusing the electron beam into one wire makes it possible to reduce the transverse size of the electron cloud in comparison to the diameter of the laser pulse. The density of the energy flux of the hot electrons in such a bunch, propagating along one nanowire, is in the excess of several times the intensity of the laser pulse.