Hi there. Im doing this pretty simple script to create folder acording to lines from a txt file.
#!/usr/local/bin/perl @arValores = (); $vDirectorio_read = "txt_entrada.txt"; $vDirectorio_write = "c:\\Datos_dms"; $vPermisos = 0777; open (LECTOR, "<$vDirectorio_read") or die "Entrada nanay"; while (<LECTOR>) { if (/(.+?)/) { $vTemp = $_; push @arValores, $vTemp; #print "$vTemp\n"; } } close LECTOR; mkdir $vDirectorio_write, oct($vPermisos); foreach $vTemp2 (@arValores){ print "$vTemp2\n"; mkdir "c:\\datos_dms\\$vTemp2\n" or warn "No se ha podido crear el + directorio $vTemp2\n"; } exit 0;
I dont know why this code doesn't create me the dirs!!! anyone can help a nerd as me ? thanks!

In reply to Whats its bad here? by Sombrerero_loco

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.