#!/usr/bin/perl use strict; use warnings; print "\nThis program is for people who don't know how to program", "\nin Perl. This program will write a program FOR YOU.", "\nYou don't have to do anything! Just run the program until", "\nyou get the desired result. How do you like that idea!?"; my $PROGRAM = "#!/usr/bin/perl\n\nuse strict;\nuse warnings;\n\n"; my $PERL_PIECES = " (){;}\n0123456789\"abcdefghijklmnopqrstuvwxyzABCDE +FGHIJKLMNOPQRSTUVWXYZ_-+[]<>|\\/:`'?!.,=~\@\$\%^&*#"; for (my $i = 0; $i < 30; $i++) { my $PTR = (rand() * 120) % length($PERL_PIECES); $PROGRAM .= substr($PERL_PIECES, $PTR, 1); } print "\n\n\nWe've come up with a great perl script just for you:\n", '-' x 75, "\n", $PROGRAM, "\n", '-' x 75; print "\n\n\nOkay. You ready? (y/n) "; $a = <STDIN>; substr($a, 0, 1) eq 'y' or exit; open my $FILE, '>test1234.pl' or die 'Dude, I cant even create file!'; binmode $FILE; print $FILE $PROGRAM; close $FILE; chmod 0755, 'test1234.pl'; system('perl test1234.pl'); $a = <STDIN>;

In reply to Re^2: Regex: matching any Number then a hyphen by harangzsolt33
in thread Regex: matching any Number then a hyphen by Anonymous Monk

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.