Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Lady_Aleena's scratchpad

by Lady_Aleena (Deacon)
on Sep 07, 2007 at 20:54 UTC ( #637756=scratchpad: print w/ replies, xml ) Need Help??


%dayparts

my $noon = 12:00; my %dayparts = ( 'morning' => { 'begin' => $dawn, 'end' => $noon}, 'afternoon' => { 'begin' => $noon, 'end' => $dusk - 1}, 'evening' => { 'begin' => $dusk - 1, 'end' => $dusk + 1}, 'night' => { 'begin' => $dusk + 1, 'end' => $dawn} );

Notes to self

  • Do not print Dumper when trying to display a script in a browser without using <pre> tags.
  • Do print Dumper when something goes wrong. The data structure is usually the problem.
  • If one changes a variable, check the whole script for that variable to make sure that the results will be as expected.
  • rename will not create directories, be sure to use mkdir in conjunction with rename if the files are also being moved to a new directory.

Notes from others

  • bart: LA it's often considered good practice to increment the variable in a continue block, to prevent running out of sync when using next.
  • Intrepid: btw, i wish i could explain to a lot of people i know, how efficacious Lady_Aleena's explained strategy can be (to use coding and thinking about coding to master a disquieted state of mind)
  • ambrus: In general, use magic only when normal solutions aren't enough.
  • GrandFather: each time through its loop while asks itself "Can I loop this time? Can I? Can I Can I? Please?" and if the answer is no (false statement) while gets grumpy and stops
  • GrandFather: First make it work (using the easiest to maintain code you can) then, only if you need to, make it faster. (from: Re^5: I have a list expanding when I don't want it to)

Things I should get a grip on

  • objects
  • SQL
  • version control
  • testing
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 chilling in the Monastery: (17)
As of 2015-01-30 16:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My top resolution in 2015 is:

















    Results (252 votes), past polls