Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Meditations

( #480=superdoc: print w/replies, xml ) Need Help??

If you've discovered something amazing about Perl that you just need to share with everyone, this is the right place.

This section is also used for non-question discussions about Perl, and for any discussions that are not specifically programming related. For example, if you want to share or discuss opinions on hacker culture, the job market, or Perl 6 development, this is the place. (Note, however, that discussions about the PerlMonks web site belong in PerlMonks Discussion.)

Meditations is sometimes used as a sounding-board — a place to post initial drafts of perl tutorials, code modules, book reviews, articles, quizzes, etc. — so that the author can benefit from the collective insight of the monks before publishing the finished item to its proper place (be it Tutorials, Cool Uses for Perl, Reviews, or whatever). If you do this, it is generally considered appropriate to prefix your node title with "RFC:" (for "request for comments").

User Meditations
If Perl 5 were to become Perl 7, what (backward-compatible) features would you want to see?
3 direct replies — Read more / Contribute
by haukex
on Oct 14, 2019 at 10:06

    Disclaimer: This post is entirely hypothetical. No decisions regarding Perl 5 have been made, or to my knowledge even been seriously discussed. It's entirely possible that Perl 5 will stay Perl 5 forever, or that the "5" will simply be dropped from the numbering (which would mean the next release of Perl is Perl 32), or something else happens.

    Now that Perl 6 has been renamed to Raku, that theoretically leaves open the possibility of Perl 5 upgrading to Perl 7. I've thought about what features would warrant a major version number change, and that's what I'm writing about here. My list is probably not complete, and I might update it if I think of more.

    First off, in my opinion, Perl should continue its tradition of being mostly backwards-compatible from release to release. If you want radical changes to the language, see Raku (and define your own slang) ;-)

    • Subroutine signatures need to come out of experimental
    • Smart matching should either be revamped, or removed entirely (Update: and if the latter, keep given as a topicalizer whose block can return a value)
    • Various other experiments should come out of experimental - e.g. refaliasing and declared_refs are IMHO pretty useful.
    • I'm not sure how this would be best implemented, but a "batteries included" Perl release would be nice. For example, one that includes Moo and other extremely common modules such as DBI. We might look to Strawberry Perl for an initial list.

    I imagine that, similar to Perl 6, a Perl 7 binary might be called perl7, with files being called .p7 or .pl7, .pm7, etc. Using this interpreter or this file extension would be the same as a use v7; (and turn on the corresponding feature bundle, etc.).

    Again, these are just hypothetical and unfinished thoughts of mine :-)

    Update: I accidentally created this post too early, sorry for all the additional edits. I'm done for now and further significant edits will be marked as such.

Quote about thinking of those who come after you.
1 direct reply — Read more / Contribute
by sbutton
on Oct 09, 2019 at 06:34
    Hi, I half remember a quote from way back along the lines of "When coding think about those who come after you, in case they do". I think it was from Tom Christiansen. Whenever I use it most people just look at me blankly, but that's perhaps part of the charm. Occasionally someone gets it. But after much searching, I can't find the original quote. Anyone got a link to it?
"Nonliteral literal" is just an expression.
1 direct reply — Read more / Contribute
by rir
on Sep 24, 2019 at 00:40
    With AoAs something like:
    my $ar = [ [ 'HEAD_goes_here', 'BODY_here' ], [ 'FOOT', 'FOOT', 'FOOT', 'FOOT' ] ];
    written as a template with the literals as documentation. After the not-finding and the not-thinking, I wrote a sub to walk AoAs and extract the references to the scalar elements. Doing it by hand, one might write:
    my $scalars_flattened = [ \$ar->[0][0], \$ar->[0][1], \$ar->[1][0], \$ar->[1][1], \$ar->[1][2], \$ar->[1][3] ];
    Its gist:
    my @flat = @{$_[0]}; while ( List::Util::any { 'ARRAY' eq ref $_ } @flat ) { @flat = map { 'ARRAY' eq ref $_ ? \(@$_) : \$_ } @flat; @flat = map { 'REF' eq ref $_ ? $$_ : $_ } @flat; }
    Fortunately only in testing did I find the less helpfully shaped templates like:
    $ar = [ 'HEAD', 'BODY', [ 'FOOT', 'FOOT', 'FOOT', 'FOOT'], ];
    I would die if I had one like that.

    Be well,
    rir

Language design: direct attribute access and postponed mutators (Perl Vs Python)
5 direct replies — Read more / Contribute
by LanX
on Sep 15, 2019 at 13:42
    Dear monastery,

    In my never ending desire to study different language designs I had a closer look into Python's OO model ...

    ... and I was very surprised to see that there attributes are accessed directly.

    object.attribute = 10

    is very common "pythonic" code.

    Doing something like object->{attribute}=10 is not only very uncommon in Perl but also heavily frowned upon.

    This is only partly because Perl's inner implementation is not necessarily a blessed hash and because in Perl methods and attributes have separated namespaces. (In python much like JS they are inside the same hash)

    The main issue is that at the moment of object design you can't know how the nature of getting and setting attributes may evolve in the future...

    ... for instance you may later want to restrict allowed values to a range of values and the setter to act like a guard which can potentially report errors.

    Could it be that the python community is totally ignorant of this issue?

    Seems not, for this case they reserve a backdoor mechanism called property where a simple attribute value is replaced by another object with dedicated get, set, delete accessors. And to facilitate using it they provide a @property decorator as syntactic sugar. "@Decorators" are the python equivalent of ":attributes" (For deeper insights please see this SO discussion)

    This reminds me a lot to the :lvalue technique once discussed for Perl.

    We can easily define a getter mechanism for a attribute with

    sub attribute :lvalue { return $value }

    And returning a tied value could be used to extend it with a proper setter.

    sub attribute :lvalue { return $tied_value }

    This help provide a object->attribute = 10 interface, were the Store and Fetch of the tied value would act as getter and setters.

    I remember seeing this discussed by Damian - not sure if here or in his OO book.

    IIRC he dismissed this technique for being to slow.

    Questions:

    • Could it be possible that the python solution is much faster?
    • If yes why?
    • are there better options in Perl to upgrade the easier interface?
    • Update: is Variable::Magic an option?

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

    PS: this is a meditation seeking for insights... fanboys please spare me with "just use moose propaganda", I'll ignore it.

The wave of unfamiliarness
No replies — Read more | Post response
by stevieb
on Sep 09, 2019 at 16:03

    I would like to apologize to all of my fellow Monks, friends, newbies and others here on Perlmonks.

    I've been on a severe roller coaster over the past few years, and it seems things have just kept up pressing without much of a break. Recently, I've been belligerent, argumentative, evasive and just not in-tune with how I normally behave.

    This is my favourite place on the Internet, and it has been for many years.

    I've been lacking in my responsiveness and dedication, and I'm not going to hide behind excuses. I am sorry if I've offended anyone.

    Apparently, last month I hit 10 years of having an actual account. Before that, I was here lurking for nine years or so.

    I love this place, and have much more to bring forth, while I continue to learn as I always have.

    Your patience has been welcoming, and I appreciate all of the kind feedback as always.

    I'm hoping, within a week or so, to get published here my dedicated Raspberry Pi test platform that also contains certain security monitoring aspects for my home. I know some have been interested in security systems, so I decided to use my hardware CI platform to monitor some windows, doors, laser trip wires and PIRs that send me photos/videos via text if any are breached so that I could test my OLED display software, serial and I2C modules, and other things that are now so common to me they may as well be within my dedicated Unit Test Suite.

    I also have a few other things up my sleeve, but I've got about a month of going through my bugs/issues to get as many out of the way as possible before I begin another weird venture.

    Cheers all, and thanks.

    -stevieb

RFC: new module WebService::Discord::Webhook
1 direct reply — Read more / Contribute
by hornpipe2
on Sep 03, 2019 at 12:34
    I originally posted this to Reddit, which directed me here.

    First, the Github link: https://github.com/greg-kennedy/p5-WebService-Discord-Webhook

    The Discord chat service allows server ops to create "webhook"s for their server. These are special secret URLs that allow an external client to post notifications into chat by making certain HTTP requests.

    (For those unfamiliar with Discord, think "Slack, if it chugged a 12 pack of Mountain Dew".)

    I created this Perl module as a way to help interact with Discord webhooks. The various functions of Webhooks are wrapped in Perl functions that execute with HTTP::Tiny, and data structures with JSON::PP. I tried to focus on ease of use and documentation.

    I would appreciate it if anyone could provide feedback or check the code and see if it looks sensible. I do plan to submit this to CPAN and it would be my first module there, so I want to make sure I get it right!

    EDIT: also on PrePAN now: http://prepan.org/module/nYmTLYacoXW

    EDIT2: Nobody had complaints except the names... no news is good news, I guess. It's on CPAN now.

Fun with implicit type conversions
3 direct replies — Read more / Contribute
by haj
on Aug 29, 2019 at 11:34
    Recently, jdporter closed one of his comments with the following snippet: $orry - not $orry

    This is a valid Perl expression. So, I wondered, what is its value? My first thought was "easy: that's just $orry converted to a number", but as ever so often, my first thought is wrong. If $orry = 0, then the value is -1. If $orry is a string, then the value is 0. Unless the string is empty, in which case the value is -1. And unless the string starts with a number, where the result is that number, even if the number is 0. And then, there are references, typeglobs, tied scalars, and objects, which may even overload stuff.

    Here's a collection of expressions for $orry, and results of $orry - not $orry.

    $orry : $orry - not $orry 42 : 42 -1 : -1 0 : -1 undef : -1 "" : -1 0e0 : -1 "0e0" : 0 "a123" : 0 "-.2e2e" : -20 "nancy boy" : NaN "infidelity" : Inf *STDOUT : 0 [] : 94269931603432 File::Temp->new : 94269935380840 URI->new(q(https://perl.org/)) : 0

    The implicit conversions of scalars into numeric / boolean / string context are amazing, and sometimes scary. Fortunately, use warnings; detects most of the surprising ones.

    Update:: syphilis contributed the strings "nancy boy" and "infidelity" which are indeed amusing additions. I inserted them after the strings starting with numbers. In the case of 'nancy boy' my text "string starts with a number" looks silly because NaN claims to be not a number.

Help with my crap
5 direct replies — Read more / Contribute
by stevieb
on Aug 22, 2019 at 20:59

    Esteemed Monks and fellow travelers,

    I'm in a position where I've got a tad bit too much to handle, so I'm putting out a request.

    For years, I've supported Perl in ways that nearly defied logic relative to my real life. Came from nothing, did something, blah blah blah.

    Many have done that. What I appreciate is the attentive use and comprehensive addition to Perl that so many Monks and others have contributed to my favourite language over the last near-20-years.

    Now, I'm not as dynamic. I'm not as fluid and liquid to bounce from one thing to the other by the minute. I can't maintain my library of software myself anymore.

    For that, and for many other reasons, I'm hoping to liquidate or at least get help with some of my Open Source Software projects.

    I'm STEVEB on the CPAN, and my repo stash is here. Take a look and let me know if there's anything you'd like to grab or take part in.

    berrybrew, as well as a few CPAN dists I favour I'd like to oversee, but mostly, take a look and let me know if you want to overtake anything.

    License retention, DVCS experience (repos stay in a freely-available and accessible location), and a proven love for Perl are absolute requirements. I put my love into what I've done. I would hope someone would take my silly code and keep it something that's usable.

    One last statement... don't take job offers seriously without doing extreme and exceptional due diligence. I got fucked up the ass while I had head injuries. Sickening, yep, fucking angering, yep, don't accept any job if you don't get paid in advance. This world is a different place anymore. I am just too tired to be raped without appreciation.

    Street-smart linguistic troublemaker who didn't see a fabricated theft coming right at him. I'm ashamed.

    -stevieb

Truth and Falsehood
3 direct replies — Read more / Contribute
by haukex
on Aug 17, 2019 at 05:19

    Truth and Falsehood

    In Perl, the following values are false in boolean context:

    • The number zero (0)
    • The string "0"
    • The empty string ""
    • undef

    All other values are true.

    Boolean context is a scalar context. Therefore the following things, when evaluated in boolean/scalar context, are also false:

    • An empty array, which evaluates to the number of elements it contains, i.e. zero (0).
    • An empty hash, which evaluates to a false value when it is empty.
    • The empty list (), which evaluates to undef.

    A true value negated by ! or not, plus many of Perl's builtins/operators, return a special false value: When evaluated as a string it is treated as "", but as a number, it is treated as 0, without causing any warnings.

    When the Perl documentation says that a operator or function returns "a false value" or "a true value" (or more simply, "false" or "true"), it may return any of the above values.

What modules should be added to the corelist?
7 direct replies — Read more / Contribute
by Anonymous Monk
on Aug 16, 2019 at 09:17
Refactoring example (A good one? (Perl6))
1 direct reply — Read more / Contribute
by holli
on Aug 10, 2019 at 17:45
    Allright, so I am hacking on a module that needs to load plugins. There is the Pluggable-module which attempts to do that. But I needed additional functionality like being able to get a list of plugins without loading them, and load a list of plugins I give it. And so I looked at the code and found it to be deeply entangled in two big functions, which somehow included already what I needed. So instead of c&p the pieces I needed into new code, I ended up refactoring the whole thing.

    The thing with refactoring and staying DRY is, that it is often hard to judge where to stop tearing the functionality into smaller and smaller components. At some point, oversight is lost. That idea was reinforced by some talk I watched this week and so I am asking myself wether my judgement in this matter is as good as I think it is.

    Long story short, here are the original version and the refactored version. Keep in mind the refactored version has a greater functionality. Did I do a good job? Which version would you want to add to? Which version would you rather look for a bug in?

    Original:
    Mine:


    holli

    You can lead your users to water, but alas, you cannot drown them.
Teen Perl
1 direct reply — Read more / Contribute
by Anonymous Monk
on Aug 09, 2019 at 03:14
    Will Braswell talks about "the Perl 11 Master Plan to make Perl the king of languages again" in the "State of the Scallion Address" at The Perl Conference 2019 in Pittsburgh. Step 1 of the plan: "We're going to have to educate young people". Perl has this hidden gem of a tutorial which was originally a multi-page website titled "Tinkering With Perl: A Child's Guide" that survives as a single webpage (without the enchanting subtitle) at https://cjshayward.com/perl/

    Will Braswell - "The State of the Scallion Address"
    https://www.youtube.com/watch?v=NyphRo5roV0

    The Perl 11 Master Plan
    https://www.youtube.com/watch?v=NyphRo5roV0&t=27m20s

RFC: Concise OOP Syntax
1 direct reply — Read more / Contribute
by LanX
on Aug 04, 2019 at 20:59
    Dear monastery!

    In continuation to

    I tried to hack a proof of concept for a concise OO syntax

    The basic ideas are that:

    Declaration of instance variable
    • my on the class level with :attributes
    • the TYPE is given right after the my
    • attributes reflect the Moo(se-)model of has keys where possible
    • the assigned values are defaults for the new-constructor
    Access of instance variables inside methods
    • an instance variable x is readable and writable via $$x
    • this is automatically mirrored in $self->{x}
    • $self->{x} is an alternative syntax for the same access
    $self
    • $self is already shifted from @_ and directly available
    Methods
    • all subs declared inside the scope of a class are methods
    • imported subs (like pp) are ignored

    { use Class BLA => ISA-LIST; use Data::Dump qw/pp/; my Int ($x,$y) :has :rw = (10,11); sub set_x { my ($var) = @_; #warn "set_x $$x -> $var \n"; $$x = $var; } sub print_x { print "x = $$x \n"; } sub print_self_x { print "x = $self->{x} (via \$self)\n"; } sub dump { warn '$self:',\$self; warn pp '$self: ', $self; warn pp '$$x: ', $$x; warn pp '$$y: ', $$y; } }

    The implementation is done via a macro expansion from use Class which injects some boilerplate into the head of the class, which handles the creation.

    Injecting is basically done via a source filter or alternatively via Keyword::Simple. NB: just injecting some code doing introspection. No parsing, regexing or modification of the code you see.

    I'm supposing this concise syntax could be used as a front end for all current OO models in Perl and might help offering a stable backwards compatible syntax if it's hardcoded into the engine.

    A rough proof of concept follows here:

    use strict; use warnings; use Data::Dump qw/pp/; { package EOS; use Data::Dump qw/pp/; use Sub::Util qw/subname/; use PadWalker qw/set_closed_over/; sub new { my ($class, $package, $r_self) = @_; return bless {package =>$package, r_self => $r_self}, "EOS"; } sub show_subs { my $this = shift; my $pkg = $this->{package}; no strict "refs"; my $stash = \ %{"${pkg}::"}; my %methods; while ( my($sym,$glob) = each %$stash) { next unless my $code = *{$glob}{CODE}; #warn "fullname: ", my $fullname = join "::", *{$glob}{PACKAGE}, $sym; #warn "subname: ", my $subname = subname($code); next unless $subname eq $fullname; #warn $fullname; $methods{$fullname} = $code; } return %methods; } sub patch_methods { my ($this, $a_attributes, $h_methods) = @_; # warn pp \@_; my $var_names = join ", ", map { keys %$_ } @$a_attributes; my $key_names = join " ", map { s/^\$//r } map { keys %$_ } @$a_attributes; my %ref_map = map { keys %$_ => map {$_->{ref}} values %$_ } @$a_attributes; $ref_map{'$self'} = $this->{r_self}; # warn pp # '$var_names: ', $var_names, # '$key_names: ', $key_names, # '\%ref_map: ', \%ref_map; while ( my ($name,$old_meth) = each %$h_methods) { my $patch= <<"__CODE__"; my (\$self, $var_names); #closure sub { \$self = shift \@_; #warn '\$self:',\\\$self; ($var_names) = \\ \@\$self{qw/$key_names/}; # warn "patch called"; # warn q/$var_names/, pp [$var_names]; goto \&\$old_meth; }; __CODE__ #warn $patch; my $c_patch = eval($patch) or die $@; #warn pp '$c_patch: ', $c_patch; set_closed_over($c_patch,\%ref_map); #my $fake_self = {x=>30,y=>40}; #$c_patch->($fake_self); #warn "redefining $name"; no warnings "redefine"; no strict "refs"; *{$name} = $c_patch; } #BLA::test({x=>30,y=>40}); #delete $ref_map{'$self'}; $this->new_constructor(\%ref_map); } sub new_constructor { my ($this, $ref_map) = @_; #warn "constructor: ", pp \@_; my @var_names = grep {!/\$self/ } keys %$ref_map; my @init = map { $$_ } @$ref_map{@var_names}; my @keys = map { s/^\$//r } @var_names; my $pkg = $this->{package}; #my $r_self = $this->{'$self'}; # pp '@var_names: ', @var_names; # pp '@init: ', @init; # pp '@keys: ', @keys; my $c_new = sub { my $self= {}; @$self{@keys} = @init; return bless $self, $pkg; }; no strict 'refs'; *{"${pkg}::new"} = $c_new; } sub DESTROY { my $self = shift; # warn "DESTROYED",pp $self; my %methods = $self->show_subs(); # warn pp \@BLA::__att__,\%methods; $self->patch_methods(\@BLA::__att__,\%methods); } } { package Int; use Data::Dump qw/pp/; use PadWalker qw/var_name/; sub MODIFY_SCALAR_ATTRIBUTES { #warn pp my ( $type, $ref, @att) = @_; #warn pp my ( $class ) = caller(1); #warn my $name = var_name(2, $ref); no strict 'refs'; push @{"${class}::__att__"}, { $name => { ref => $ref, att => \@att, } }; return ; } } { # use Class BLA => ISA-LIST # ----start boilerplate package BLA; our @ISA = qw/ISA-LIST/; my $self = {}; #warn '$self:',\$self; my $__end_of_scope__ = EOS->new(__PACKAGE__, \ $self); no warnings 'reserved'; # allow lowercase :attributes # --- stop boilerplate use Data::Dump qw/pp/; my Int ($x,$y) :has :rw = (10,11); sub dump { warn '$self:',\$self; warn pp '$self: ', $self; warn pp '$$x: ', $$x; warn pp '$$y: ', $$y; } sub set_x { my ($var) = @_; #warn "set_x $$x -> $var \n"; $$x = $var; } sub print_x { print "x = $$x \n"; } sub print_self_x { print "x = $self->{x} (via \$self)\n"; } } my $obj = BLA->new(); $obj->print_x(); $obj->set_x(666); $obj->print_x(); $obj->set_x(42); $obj->print_self_x; #$obj->dump();

    NB: This example is pretty barebone, and not meant to be an alternative to other OO Frameworks, but rather a frontend. It doesn't create accessors and the constructor is only simplistic.

    Comments?

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

parent::versioned supports minimum version specification in parent classes
3 direct replies — Read more / Contribute
by davido
on Aug 04, 2019 at 14:58

    A question came up here recently where a user wished to specify a minimum version for a parent class. base doesn't support specifying minimum versions, nor does parent. base and parent are core Perl modules. I don't think it would be appropriate to add complexity to the core Perl parent by adding this feature.

    Perl facilitates setting minimum versions in use statements:

    use Time::HiRes 1.9;

    use has a compiletime effect, so that code behaves like this:

    BEGIN { require Time::HiRes; Time::HiRes->VERSION(1.9) Time::HiRes->import }

    However, BEGIN blocks require us to consider the order of loading more than we may want to. This doesn't fit the model of keeping simple things simple, if the simple thing we want to do is fairly common.

    For inheritance we can do this:

    package MyAgent; BEGIN { require LWP::Usergent; LWP::UserAgent->VERSION(6.39); # Assert a minimal version. push @MyAgent::ISA, 'LWP::UserAgent'; }

    To me that's too much boilerplate for a common need. Another way:

    package MyAgent; use parent 'LWP::UserAgent'; BEGIN {LWP::UserAgent->VERSION(6.39)}

    But that's a little fragile; someone may refactor and forget to keep the BEGIN block after the call to parent causing things blow up. Sometimes code becomes complex, masking simple mistakes. I would prefer a solution that doesn't require the user to maintain several steps to set up inheritance while assuring minimal versions for parent classes.

    parent::versioned makes the inheritance and compile-time version checking more convenient, and harder to get wrong. I uploaded it to CPAN a few hours ago.

    package Myagent; use parent::versioned ['LWP::UserAgent' => 6.39];

    parent and parent::versioned behave the same for all import lists unless an element in the import list is an array ref. Any array ref passed to the import list will be treated as a tuple that specifies a module name, and a minimum version for that module. Multiple inheritance works like this:

    use parent::versioned ['LWP::UserAgent' => 6.39], ['Mojo::DOM' => 7.2 ], 'Foo::Base';

    This example sets up triple inheritance: two modules that are version checked, and one that is not. As with parent, parent::versioned accepts the -norequire flag.

    The parent module has 100% code test coverage. parent::versioned passes the parent test suite and maintains 100% coverage. It should work as a drop-in replacement for parent, but with the additional functionality exposed by passing an array-ref as part (or all) of the import list. Most of the code is a direct fork from parent. You can use it just like you use parent:

    use parent::versioned qw(Foo);

    I prefer keeping the module small, but if you're interested please do look at the GitHub repository. Patches, issues, and suggestions are welcomed. I hope it becomes useful.


    Dave

Hashes do preserve insertion order after all
5 direct replies — Read more / Contribute
by kikuchiyo
on Jul 31, 2019 at 12:00

    It is often repeated that hashes in Perl do not preserve insertion order. Yet:

    #!/usr/bin/perl use strict; use warnings; use feature qw/say/; my %hoh = ( foo => { value => 'first' }, bar => { value => 'second' }, baz => { value => 'third' }, ); for my $elem (sort values %hoh) { say "value => " . $elem->{value}; }

    Output:

    value => first value => second value => third

    What actually happens is that sort uses the stringified value, in effect the memory address, of the references for comparison, and the addresses of the hashrefs in the toplevel hash tend to (strictly) monotonously increase in the order the interpreter encounters them, i.e. in insertion order.

    Obviously, this is not 100% reliable, and only works as is if the elements are references themselves. For scalars some nastiness with 'unpack "p"' or similar would be needed.

    Still, it is sort of neat and it was surprising when I've first encountered it.

    Edit and clarification: I'm not saying that you should ever use this (in fact, I'm saying that you shouldn't, the comments below describe why). It looks like as if it really preserved insertion order, but actually the trick relies on implementation details (memory allocation) you can't (or shouldn't want to) control.


Add your Meditation
Title:
Meditation:
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, 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, 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.
  • Log In?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others rifling through the Monastery: (4)
    As of 2019-10-18 07:33 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Notices?