in reply to Why am unable to create another directory using perl?

Hello finddata,

Although backticks enclose a system command, the backtick construct itself still constitutes a Perl command, and so must terminate in a semicolon (unless it’s the last command in a block):

... `find . -name '*.html' | cpio -pdm html`; # ^ mkdir 'files',0755; ...

Hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Replies are listed 'Best First'.
Re^2: Why am unable to create another directory using perl?
by finddata (Sexton) on Mar 15, 2017 at 06:29 UTC
    Is it possible to copy files without directory structure?
    chdir $output_dir; mkdir 'html',0755; `find . -name '*.html' | cpio -pdm html`; chdir $output_dir; mkdir 'htmlfiles',0755; `cp -r html htmlfiles`;
    Here it copies along with directory structure
      What about files in different directories that have the same name?
      (Most prevalent probably index.html)