- In the beginning, Larry said, "Let there be Perl", and there was Perl.
- And many programmers flocked to Perl saying, "Let us do this and that in Perl".
- And the programmers wrote sloppy code, and hacked code, and dirty code, and nice code, and all types of code.
- And there became more than one way to do it.
|
Awhile back, some girl, I assume, asked how she could make flowers with Perl. Everyone directed her to various ascii art modules or 2d graphics libraries, my personal offering would have been Tk::Zinc generation of petals. That code is quite complicated.But as the winter freeze sets in on my camp, I have found an ever-blooming flower, which can be generated with a single line of Perl code.
screenshot 1
screenshot 2
#!/usr/bin/perl
use PDL;
use PDL::Graphics::TriD;
# hit 'q' to exit
imag3d [sqrt(rvals(zeroes(50,50))/2)], {Lines=>0};
|
/regular/expression/ism;
|
|
|
I wrote some Perl to say hello,
To a world i did not know.
Prepended line numbers there in tow,
I basically told it where to go.
10 ? 'Hello World!\n';
Something there did not quite load,
No matter how i tried to goad,
Quickly then i shifted mode,
And thought i'd see to add the code.
use cout;
print << 'Hello World!\n';
But that just didn't work at all,
Did i forget to make a call?
Imagining i was Larry Wall,
I coded the sequel to carry the ball.
query::statement->execute('SELECT "Hello World!\n"');
What's there to object in that line?
On paper it had worked just fine,
Perl is broken...or is that just mine?
No, add a line, and never whine!
procedure perl is begin(print 'Hello World!\n')
Something there was still not right,
But, waste not time and be contrite.
I must put up and win this fight,
Make a web of code to end my plight.
<?perl <print>'Hello World!\n'</print>; ?>
Just when i thought my code was suited,
I found that i was just deluded,
But where had the offending line intruded?
Oh! Just assemble a line to be included.
use LC0.ascii /Hello, world!/;
movl $LC0, (%esp);
Why is it that Perl is so frustrating?
I give perfect code, yet it's not abating,
And people love what i start hating?
I need help, if just for tranlsating.
print *, "Hello World!",
e\nd
Then again, thrown to the ground,
But i know that my good code is sound!
Perhaps the web has help to be found,
And answer: why does perl monkey around?
I added a node, asking the question,
I posted my code, and made sure to mention,
How perfect it was, (at least in inflection).
I just hope that Poetry is the correct section.
|
our happiness is
like the weather blowing in
the wind in our sail
|
- use strict; use warnings;
- winter, spring, summer, and fall
- and Perl is your friend
* or Carole King
|
use my or use our
I, the variable sit
and wait eternal
|
the while(1){} loop
escapes infinity
by transcending time()
|
Great Announcement!
computer scientists say:
It is all magic!
|