Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
#!/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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-24 18:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found