Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Comment on

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

In terms of database design, class design, and many other programming tasks, it is often useful to restrict your concept of numbers to there being only three numbers:

  • None
  • One
  • Many

For example: never design a database that can store two e-mail addresses for a contact. It should store none, one, or many. Now, your interface might restrict people to entering a "sensible" number of e-mail addresses like two, or six, or ten, but the database design should stick with none, one, or many.

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

In reply to Re^2: In base 1, the number after 0 is: by tobyink
in thread In base 1, the number after 0 is: by chacham

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, 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?
    [Cosmic37]: now I have tried another blunder - can anyone explain why I am such a dunderhead?
    [Cosmic37]: if ( $line =~ /$mydt/ ) { print $line; }
    [Cosmic37]: I try to match successive date times stored in variable $mydt
    [Cosmic37]: I guess it is searching for the string "$mydt"
    [Corion]: Indeed cool, erix ;)
    [Cosmic37]: rather than the value of $mydt which is a date time strong such as 2016-01-01 12:30:56
    [Corion]: Cosmic37: No, but maybe $mydt doesn't contain what you think it does, or it contains characters that are special in a regular expression? Try if( $line =~ /\Q$mydt\E/) { ... for a literal match
    [Cosmic37]: I mean string grrr
    [Corion]: Maybe add an else branch in which you print what the values of $line and $mydt are?
    [Cosmic37]: ah thank you I will try

    How do I use this? | Other CB clients
    Other Users?
    Others lurking in the Monastery: (11)
    As of 2017-06-29 16:58 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      How many monitors do you use while coding?















      Results (673 votes). Check out past polls.